mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Resolved #25, Indexing an array with a non-integer causes an error
This commit is contained in:
@@ -206,6 +206,7 @@ Literal copyLiteral(Literal original) {
|
||||
|
||||
case LITERAL_FUNCTION_INTERMEDIATE: //caries a compiler
|
||||
case LITERAL_FUNCTION_NATIVE:
|
||||
case LITERAL_INDEX_BLANK:
|
||||
//no copying possible
|
||||
return original;
|
||||
|
||||
@@ -333,6 +334,9 @@ bool literalsAreEqual(Literal lhs, Literal rhs) {
|
||||
fprintf(stderr, ERROR "[internal] Can't compare intermediate functions\n" RESET);
|
||||
return false;
|
||||
|
||||
case LITERAL_INDEX_BLANK:
|
||||
return false;
|
||||
|
||||
default:
|
||||
//should never be seen
|
||||
fprintf(stderr, ERROR "[internal] Unrecognized literal type in equality: %d\n" RESET, lhs.type);
|
||||
|
||||
Reference in New Issue
Block a user