[vala/staging] girparser: Drop obsolete workaround for interface prerequisites



commit 355b5dedec140b66921ef33750b9cb243c692b7c
Author: Princeton Ferro <princetonferro gmail com>
Date:   Mon Mar 2 23:56:57 2020 +0100

    girparser: Drop obsolete workaround for interface prerequisites

 vala/valagirparser.vala | 26 --------------------------
 1 file changed, 26 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 1e0d9a939..5c49f2fc0 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1162,8 +1162,6 @@ public class Vala.GirParser : CodeVisitor {
                                        }
                                } else if (symbol is Signal || symbol is Delegate) {
                                        parser.process_callable (this);
-                               } else if (symbol is Interface) {
-                                       parser.process_interface (this);
                                } else if (symbol is Struct) {
                                        if (parent.symbol is ObjectTypeSymbol || parent.symbol is Struct) {
                                                // nested struct
@@ -3722,30 +3720,6 @@ public class Vala.GirParser : CodeVisitor {
                }
        }
 
-       void process_interface (Node iface_node) {
-               /* Temporarily workaround G-I bug not adding GLib.Object prerequisite:
-                  ensure we have at least one instantiable prerequisite */
-               Interface iface = (Interface) iface_node.symbol;
-               bool has_instantiable_prereq = false;
-               foreach (DataType prereq in iface.get_prerequisites ()) {
-                       Symbol sym = null;
-                       if (prereq is UnresolvedType) {
-                               var unresolved_symbol = ((UnresolvedType) prereq).unresolved_symbol;
-                               sym = resolve_symbol (iface_node.parent, unresolved_symbol);
-                       } else {
-                               sym = prereq.type_symbol;
-                       }
-                       if (sym is Class) {
-                               has_instantiable_prereq = true;
-                               break;
-                       }
-               }
-
-               if (!has_instantiable_prereq) {
-                       iface.add_prerequisite (new ObjectType ((ObjectTypeSymbol) glib_ns.scope.lookup 
("Object")));
-               }
-       }
-
        void process_alias (Node alias) {
                /* this is unfortunate because <alias> tag has no type information, thus we have
                   to guess it from the base type */


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