From 6185f8847ca986fd290110dfff4c62a99830209b Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Mon, 26 Apr 2021 10:01:53 +0200 Subject: [PATCH] Fixed type resolution for built-in types --- source/tlang/compiler/typecheck/core.d | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/source/tlang/compiler/typecheck/core.d b/source/tlang/compiler/typecheck/core.d index a558f2b..1dc57c1 100644 --- a/source/tlang/compiler/typecheck/core.d +++ b/source/tlang/compiler/typecheck/core.d @@ -68,18 +68,14 @@ public final class TypeChecker Type foundType; /* Check if the type is built-in */ - /* TODO: Just use `getBuiltInType`, if null then yeah - not built-in */ - if(isBuiltInType(typeString)) - { - /* TODO: Get the built-in type */ - foundType = getBuiltInType(typeString); - } - /* If not built-in, resolve it */ - else + foundType = getBuiltInType(typeString); + + /* If it isn't then check for a type (resolve it) */ + if(!foundType) { foundType = cast(Type)resolver.resolveBest(c, typeString); } - + return foundType; }