]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Report a warning for conflicting class and instance methods
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 16 Feb 2020 19:15:04 +0000 (20:15 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 16 Feb 2020 19:15:04 +0000 (20:15 +0100)
vala/valagirparser.vala

index 6719d8e0821d61c827cab7197dc42c2bb43c7c76..30468323a4552b37877f16c86c2fd14406eea0f6 100644 (file)
@@ -947,6 +947,9 @@ public class Vala.GirParser : CodeVisitor {
                                                                        }
                                                                        node.merged = true;
                                                                }
+                                                       } else if (m.is_class_member ()) {
+                                                               Report.warning (symbol.source_reference, "Class method `%s' conflicts with method of the same name".printf (get_full_name ()));
+                                                               node.merged = true;
                                                        }
                                                }
                                        }