]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Use global CodeContext to retrieve root_symbol
authorLuca Bruno <lucabru@src.gnome.org>
Sat, 4 May 2013 13:35:04 +0000 (15:35 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 10 Apr 2019 13:21:17 +0000 (15:21 +0200)
vala/valaerrortype.vala

index c7c9f9348fd31524c53625c1716b9f96c4c04e64..77c5093755a851f1deb9ae48ec12d07c72dbe642 100644 (file)
@@ -112,8 +112,7 @@ public class Vala.ErrorType : ReferenceType {
        }
 
        public override Symbol? get_member (string member_name) {
-               var root_symbol = source_reference.file.context.root;
-               var gerror_symbol = root_symbol.scope.lookup ("GLib").scope.lookup ("Error");
+               var gerror_symbol = CodeContext.get ().root.scope.lookup ("GLib").scope.lookup ("Error");
                return gerror_symbol.scope.lookup (member_name);
        }