[vala/0.48] vala: Clear SemanticAnalyzer.current_{symbol, source_file} when not needed anymore



commit 6439888e56c0229dd5e715e38c7c928792540243
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Feb 9 21:32:09 2022 +0100

    vala: Clear SemanticAnalyzer.current_{symbol,source_file} when not needed anymore

 vala/valasemanticanalyzer.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala
index abc0a4b56..8b701da7f 100644
--- a/vala/valasemanticanalyzer.vala
+++ b/vala/valasemanticanalyzer.vala
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]