From 15f894b668346ca65cfea3fd1e9adac55a95d65b Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Thu, 1 Apr 2021 17:33:25 +0200 Subject: [PATCH] Everything works --- source/tlang/compiler/typecheck/resolution.d | 9 ++++++++ source/tlang/testing/test3.t | 23 ++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 source/tlang/testing/test3.t diff --git a/source/tlang/compiler/typecheck/resolution.d b/source/tlang/compiler/typecheck/resolution.d index dbe2e387..816f216a 100644 --- a/source/tlang/compiler/typecheck/resolution.d +++ b/source/tlang/compiler/typecheck/resolution.d @@ -193,6 +193,13 @@ public final class Resolver { /* TODO: Add path[0], c.getName()) == modulle */ + /* TODO: This is for getting module entity */ + /* Check if the name, regardless of container, is root (Module) */ + // if(cmp(name, typeChecker.getModule().getName()) == 0) + // { + // return typeChecker.getModule(); + // } + Entity entityWithin = resolveUp(c, name); /* If `name` was in container `c` or above it */ @@ -208,6 +215,8 @@ public final class Resolver } else { + /* TODO: Add module name check here */ + /* If the root is the current container */ if(cmp(path[0], c.getName()) == 0) { diff --git a/source/tlang/testing/test3.t b/source/tlang/testing/test3.t new file mode 100644 index 00000000..39becee2 --- /dev/null +++ b/source/tlang/testing/test3.t @@ -0,0 +1,23 @@ +module jj; + +int i; + +class pp +{ + int i; +} + +class k +{ + class pdp + { + class i + { + + } + } + class p : pp.i + { + + } +} \ No newline at end of file