[vala/staging] vala: Drop duplicate check for unsupported flag of struct methods



commit c507539ebc3060a5c08de628bf748cfbccc1749c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Dec 12 18:47:53 2021 +0100

    vala: Drop duplicate check for unsupported flag of struct methods

 vala/valamethod.vala | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index f3617c4bd..5eb1b9a95 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -959,13 +959,7 @@ public class Vala.Method : Subroutine, Callable {
                        body.check (context);
                }
 
-               if (context.analyzer.current_struct != null) {
-                       if (is_abstract || is_virtual || overrides) {
-                               error = true;
-                               Report.error (source_reference, "A struct member `%s' cannot be marked as 
override, virtual, or abstract", get_full_name ());
-                               return false;
-                       }
-               } else if (overrides && base_method == null && base_interface_method != null && 
base_interface_method.is_abstract) {
+               if (overrides && base_method == null && base_interface_method != null && 
base_interface_method.is_abstract) {
                        Report.warning (source_reference, "`override' not required to implement `abstract' 
interface method `%s'", base_interface_method.get_full_name ());
                        overrides = false;
                } else if (overrides && base_method == null && base_interface_method == null) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]