]> 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:56:07 +0000 (21:56 +0100)
vala/valasemanticanalyzer.vala

index 7f2e56c0394032b545cc2252368616c0e9a6c3a2..20a694519fe715cdc4c9e73f493edec76e289e4d 100644 (file)
@@ -254,6 +254,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                context.root.check (context);
                context.accept (this);
 
+               current_symbol = null;
                this.context = null;
        }
 
@@ -261,6 +262,8 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                current_source_file = file;
 
                file.check (context);
+
+               current_source_file = null;
        }
 
        // check whether type is at least as accessible as the specified symbol