From c507539ebc3060a5c08de628bf748cfbccc1749c Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sun, 12 Dec 2021 18:47:53 +0100 Subject: [PATCH] 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) { -- 2.47.2