]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Drop duplicate check for unsupported flag of struct methods
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 12 Dec 2021 17:47:53 +0000 (18:47 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 12 Dec 2021 17:47:53 +0000 (18:47 +0100)
vala/valamethod.vala

index f3617c4bd129dbd9be3af6e3059d7db07770db47..5eb1b9a9592bd8a92c09ba2902211da1e9be667c 100644 (file)
@@ -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) {