diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-12-12 18:47:53 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-12-12 18:47:53 +0100 |
commit | c507539ebc3060a5c08de628bf748cfbccc1749c (patch) | |
tree | adb0124aea0ad078d3936d9b20d0821aa787e054 | |
parent | e3b7be0e17f41a1f817ad2a35beb54e1ed10f483 (diff) | |
download | vala-c507539ebc3060a5c08de628bf748cfbccc1749c.tar.gz |
vala: Drop duplicate check for unsupported flag of struct methods
-rw-r--r-- | vala/valamethod.vala | 8 |
1 files changed, 1 insertions, 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) { |