]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Use CodeContext.root instead of SemanticAnalyzer.root_symbol
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 14 Dec 2017 08:57:53 +0000 (09:57 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 14 Dec 2017 09:26:31 +0000 (10:26 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=712694

vala/valacharacterliteral.vala
vala/valaintegerliteral.vala
vala/valamemberaccess.vala
vala/valarealliteral.vala

index 71bed95a1dae9d801a92f00c229b153e60be3a9a..cecddbac4115e7a7f8d84dcb6d476b97710c645c 100644 (file)
@@ -91,9 +91,9 @@ public class Vala.CharacterLiteral : Literal {
                checked = true;
 
                if (get_char () < 128) {
-                       value_type = new IntegerType ((Struct) context.analyzer.root_symbol.scope.lookup ("char"));
+                       value_type = new IntegerType ((Struct) context.root.scope.lookup ("char"));
                } else {
-                       value_type = new IntegerType ((Struct) context.analyzer.root_symbol.scope.lookup ("unichar"));
+                       value_type = new IntegerType ((Struct) context.root.scope.lookup ("unichar"));
                }
 
                return !error;
index 77a5bc836decd4cd1380f9ba196fc8e29d74926b..3a1d6734c906c0660cf7fdc298bf7b0e4e15d903 100644 (file)
@@ -114,7 +114,7 @@ public class Vala.IntegerLiteral : Literal {
                        }
                }
 
-               var st = (Struct) context.analyzer.root_symbol.scope.lookup (type_name);
+               var st = (Struct) context.root.scope.lookup (type_name);
                // ensure attributes are already processed
                st.check (context);
 
index 93652026c1e6ef72443fa79e79b2028b110e382e..85f8bbb638dca4cd94fc93c4db431fe9b8712b74 100644 (file)
@@ -216,8 +216,8 @@ public class Vala.MemberAccess : Expression {
                symbol_reference = null;
 
                if (qualified) {
-                       base_symbol = context.analyzer.root_symbol;
-                       symbol_reference = context.analyzer.root_symbol.scope.lookup (member_name);
+                       base_symbol = context.root;
+                       symbol_reference = base_symbol.scope.lookup (member_name);
                } else if (inner == null) {
                        if (member_name == "this") {
                                if (!context.analyzer.is_in_instance_method ()) {
index 0dc01add865120db50bbb4f0462216b4cdacac68..550c2b45c26061859da24580ee2cd7b1c0174981 100644 (file)
@@ -77,7 +77,7 @@ public class Vala.RealLiteral : Literal {
 
                checked = true;
 
-               var st = (Struct) context.analyzer.root_symbol.scope.lookup (get_type_name ());
+               var st = (Struct) context.root.scope.lookup (get_type_name ());
                // ensure attributes are already processed
                st.check (context);