[vala/staging] girparser: Report a warning for conflicting class and instance methods



commit 4985008fe38ed80218b15a0f6a3b2861cf0ea2b6
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Feb 16 20:15:04 2020 +0100

    girparser: Report a warning for conflicting class and instance methods

 vala/valagirparser.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 6719d8e08..30468323a 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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;
                                                        }
                                                }
                                        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]