From f695d27860e58971877c20455e35b62e3f6fdc38 Mon Sep 17 00:00:00 2001 From: Daniel Espinosa Date: Tue, 16 Oct 2018 17:05:24 -0500 Subject: [PATCH] vala: removed CodeContext reference in SemanticAnalyzer --- vala/valasemanticanalyzer.vala | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index bb4f9b744..7e20bc6f9 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -28,7 +28,6 @@ using GLib; * Code visitor analyzing and checking code. */ public class Vala.SemanticAnalyzer : CodeVisitor { - CodeContext context; public Symbol? current_symbol { get; set; } public SourceFile current_source_file { get; set; } @@ -185,7 +184,6 @@ public class Vala.SemanticAnalyzer : CodeVisitor { * @param context a code context */ public void analyze (CodeContext context) { - this.context = context; var root_symbol = context.root; @@ -249,13 +247,12 @@ public class Vala.SemanticAnalyzer : CodeVisitor { context.root.check (context); context.accept (this); - this.context = null; } public override void visit_source_file (SourceFile file) { current_source_file = file; - file.check (context); + file.check (CodeContext.get ()); } // check whether type is at least as accessible as the specified symbol @@ -1069,7 +1066,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { init.initializer.formal_target_type = member_type; init.initializer.target_type = init.initializer.formal_target_type.get_actual_type (type, null, init); - init.check (context); + init.check (CodeContext.get ()); if (init.initializer.value_type == null || !init.initializer.value_type.compatible (init.initializer.target_type)) { init.error = true; -- 2.47.2