mirror of https://github.com/tbklang/tlang.git
Typechecker
- Removed `assert(false)` in code which handles a mismatched parameter type versus argument type, replaced with a throws `TypeMismatchException`
This commit is contained in:
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…
Reference in New Issue