[vala/685-remove-context-from-semantic-analyzer: 696/697] vala: removed CodeContext reference in SemanticAnalyzer
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/685-remove-context-from-semantic-analyzer: 696/697] vala: removed CodeContext reference in SemanticAnalyzer
- Date: Thu, 10 Oct 2019 20:08:28 +0000 (UTC)
commit f695d27860e58971877c20455e35b62e3f6fdc38
Author: Daniel Espinosa <esodan gmail com>
Date: Tue Oct 16 17:05:24 2018 -0500
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]