From 6c0a0ec69ea575fa0555905932e5afb033dd476e Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Fri, 4 Jun 2021 11:44:51 +0200 Subject: [PATCH] Idea: /* TODO: Got it, we NEED a dependency tree, to know chihs is being processed previosuly */ --- source/tlang/compiler/typecheck/core.d | 9 +++++++++ source/tlang/testing/basic1_typedeclrationchecking.t | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/tlang/compiler/typecheck/core.d b/source/tlang/compiler/typecheck/core.d index 695a7a1..bbc2821 100644 --- a/source/tlang/compiler/typecheck/core.d +++ b/source/tlang/compiler/typecheck/core.d @@ -134,6 +134,7 @@ public final class TypeChecker if(cast(Number)type) { /* TODO: Mark it as ready-for-reference */ + type.mark(); } else { @@ -142,6 +143,8 @@ public final class TypeChecker { Clazz clazzType = cast(Clazz)type; + /* TODO: Check constructor */ + /* TODO: We need to start marking things */ /* TODO: Do actual checks here now */ @@ -149,9 +152,15 @@ public final class TypeChecker if(clazzType == c) { gprintln("Container we are in matches type of TypedEdntity being processed"); + + /* TODO: In that case mark the entity as fine */ + clazzType.mark(); } else { + /* TODO: Also make it fine? mmuutal recusive refernce */ + /* TODO: Got it, we NEED a dependency tree, to know chihs is being processed previosuly */ + /* TODO: Now check this class and follow it's path */ checkClass(clazzType); } diff --git a/source/tlang/testing/basic1_typedeclrationchecking.t b/source/tlang/testing/basic1_typedeclrationchecking.t index 1381dfc..6ed9a24 100644 --- a/source/tlang/testing/basic1_typedeclrationchecking.t +++ b/source/tlang/testing/basic1_typedeclrationchecking.t @@ -60,8 +60,7 @@ class Shekshi class kl { - kl o; - Shekshi oo; + } int Shekshi2;