This commit is contained in:
ChUrl
2020-12-14 15:11:05 +01:00
parent 1991255ee6
commit 50cb660c4c
3 changed files with 17 additions and 2 deletions

View File

@ -66,7 +66,7 @@ public final class TypeChecker {
ASTNode literalNode = root.getChildren().get(0);
String literalType = nodeTable.get(literalNode);
log("Validating Assignment: " + identifierType + ": " + identifier + " = " + literalNode.toString().trim());
log("Validating Assignment: " + identifierType + ": " + identifier + " = " + literalType);
if (!literalType.equals(identifierType)) {
throw new AssignmentTypeMismatchException("Trying to assign " + literalType + " to a " + identifierType + " variable.");