Fixed a way to have a bad type, thanks neuf!

This commit is contained in:
2023-01-21 13:33:25 +00:00
parent d3516b4fc9
commit 33f360c9cf
2 changed files with 12 additions and 0 deletions

View File

@@ -239,6 +239,10 @@ bool declareScopeVariable(Scope* scope, Literal key, Literal type) {
return false;
}
if (!IS_TYPE(type)) {
return false;
}
//store the type, for later checking on assignment
setLiteralDictionary(&scope->types, key, type);