Typechecker

- Removed `assert(false)` in code which handles a mismatched parameter type versus argument type, replaced with a throws `TypeMismatchException`
compiler_object
Tristan B. V. Kildaire 4 months ago
parent ab66860e7b
commit 03a998bae8

@ -1065,7 +1065,8 @@ public final class TypeChecker
printCodeQueue();
gprintln("Wrong actual argument type for function call", DebugType.ERROR);
gprintln("Cannot pass value of type '"~argType.getName()~"' to function accepting '"~parmType.getName()~"'", DebugType.ERROR);
assert(false);
throw new TypeMismatchException(this, parmType, argType, "The actual argument's type does not match that of the function's parameter type");
}
parmCount--;

Loading…
Cancel
Save