From: Rico Tzschichholz Date: Sun, 12 Dec 2021 17:47:53 +0000 (+0100) Subject: vala: Drop duplicate check for unsupported flag of struct methods X-Git-Tag: 0.55.1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c507539ebc3060a5c08de628bf748cfbccc1749c;p=thirdparty%2Fvala.git vala: Drop duplicate check for unsupported flag of struct methods --- 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) {