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

index 5509422697404293d967419009f23a3942c6aa0d..bf84ee8903fbff3a7f82176781dd0bd162ec5b3e 100644 (file)
@@ -252,6 +252,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                context.root.check (context);
                context.accept (this);
 
+               current_symbol = null;
                this.context = null;
        }
 
@@ -259,6 +260,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