SHow error on invalid type being used for variable declarations

entity_declaration_type_checking
Tristan B. V. Kildaire 2021-04-23 14:09:05 +02:00
parent 089d2b1584
commit 5e296dd67c
1 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,12 @@ public final class TypeChecker
/* TODO: Resolve type here (either built-in or class type) */
Type type = getType(c, typeString);
/* Make sure type is valid */
if(!type)
{
Parser.expect("Invalid type \""~typeString~"\"");
}
gprintln("TYpe"~to!(string)(type));
}