Улучшен вывод ошибки при несовпадении типов

This commit is contained in:
Victor 2016-07-09 23:28:18 +03:00
parent 3b90e544a7
commit eb2ab6ee50
2 changed files with 2 additions and 2 deletions

View File

@ -17,6 +17,6 @@ public final class Types {
if (FIRST <= type && type <= LAST) { if (FIRST <= type && type <= LAST) {
return NAMES[type]; return NAMES[type];
} }
return "unknown"; return "unknown (" + type + ")";
} }
} }

View File

@ -36,7 +36,7 @@ public final class ContainerAccessExpression implements Expression, Accessible {
return ((MapValue) container).get(lastIndex); return ((MapValue) container).get(lastIndex);
default: default:
throw new TypeException("Array or map expected. Got " + container.type()); throw new TypeException("Array or map expected. Got " + Types.typeToString(container.type()));
} }
} }