diff --git a/source/tlang/compiler/typecheck/core.d b/source/tlang/compiler/typecheck/core.d index 06d0a69..ead5aa3 100644 --- a/source/tlang/compiler/typecheck/core.d +++ b/source/tlang/compiler/typecheck/core.d @@ -325,17 +325,19 @@ public final class TypeChecker } } - /* Find the name starting in upper cotainer */ - Entity clazzAbove = resolveUp(parentContainer, clazz.getName()); + /* TODO: We allow shaddowing so below is disabled */ + /* TODO: We should however use the below for dot-less resolution */ + // /* Find the name starting in upper cotainer */ + // Entity clazzAbove = resolveUp(parentContainer, clazz.getName()); - if(!clazzAbove) - { + // if(!clazzAbove) + // { - } - else - { - Parser.expect("Name in use abpve us, bad"~to!(string)(clazz)); - } + // } + // else + // { + // Parser.expect("Name in use abpve us, bad"~to!(string)(clazz)); + // } /* If the Container's parent container is Module then we can have /* TODO: Check that it doesn;t equal any class up the chain */ diff --git a/source/tlang/testing/basic1.t b/source/tlang/testing/basic1.t index 7789900..a184846 100644 --- a/source/tlang/testing/basic1.t +++ b/source/tlang/testing/basic1.t @@ -50,14 +50,17 @@ public class clazz1 class bruh2 { - } + } } + + class bruh + { + + } + } -class myModule -{ - -} + class bruh {