]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Clear SemanticAnalyzer.current_{symbol,source_file} when not needed anymore
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 9 Feb 2022 20:32:09 +0000 (21:32 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 9 Feb 2022 20:32:09 +0000 (21:32 +0100)
vala/valasemanticanalyzer.vala

index 80e54d9c1e821def6dfb72319ee310e3d28a5ac3..b1378b55740f2a51dd5fbe3ce1d3f19ffe61a340 100644 (file)
@@ -256,6 +256,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                context.root.check (context);
                context.accept (this);
 
+               current_symbol = null;
                this.context = null;
        }
 
@@ -263,6 +264,8 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                current_source_file = file;
 
                file.check (context);
+
+               current_source_file = null;
        }
 
        public DataType? get_value_type_for_symbol (Symbol sym, bool lvalue) {