Added the opaque keyword

This commit is contained in:
2022-10-03 21:32:09 +01:00
parent 8ce7dd0d95
commit bd4ab2aa04
5 changed files with 10 additions and 3 deletions

View File

@@ -570,6 +570,8 @@ static bool execVarDecl(Interpreter* interpreter, bool lng) {
parseCompoundToPureValues(interpreter, &val);
}
//TODO: could restrict opaque data to only opaque variables
//BUGFIX: allow easy coercion on decl
if (AS_TYPE(type).typeOf == LITERAL_FLOAT && IS_INTEGER(val)) {
val = TO_FLOAT_LITERAL(AS_INTEGER(val));