From f0b4e62370e58a3d0df1bf2bd0d51b42f07fc48a Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 16 Aug 2023 10:42:07 +0200 Subject: [PATCH] Dependency - Cleaned up --- source/tlang/compiler/typecheck/dependency/core.d | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/source/tlang/compiler/typecheck/dependency/core.d b/source/tlang/compiler/typecheck/dependency/core.d index 005ae5e..9699dfe 100644 --- a/source/tlang/compiler/typecheck/dependency/core.d +++ b/source/tlang/compiler/typecheck/dependency/core.d @@ -741,16 +741,10 @@ public class DNodeGenerator VariableExpression varExp = cast(VariableExpression)exp; string nearestName = varExp.getName(); - /** - * FIXME: See issue #68 (https://deavmi.assigned.network/git/tlang/tlang/issues/68#issuecomment-2449) - * - * Set context for expression and the variable itself - */ + // Set the context of the variable expression varExp.setContext(context); - gprintln("Context (after): "~to!(string)(varExp.getContext().getContainer())); - - /* Resolve the Entity */ + // Resolve the entity the name refers to Entity namedEntity = tc.getResolver().resolveBest(context.getContainer(), nearestName); @@ -787,9 +781,6 @@ public class DNodeGenerator { expect("Cannot reference variable "~nearestName~" which exists but has not been declared yet"); } - - - /* Use the Context to make a decision */ } /** * If `namedEntity` is a `Function`