diff --git a/sourcepawn/compiler/sc1.cpp b/sourcepawn/compiler/sc1.cpp index 13485f97..a4b9c279 100644 --- a/sourcepawn/compiler/sc1.cpp +++ b/sourcepawn/compiler/sc1.cpp @@ -2206,6 +2206,17 @@ static void declloc(int tokid) &type->idxtag[i], &child, 0, &val); pushreg(sPRI); + + switch (ident) { + case iVARIABLE: + case iEXPRESSION: + case iARRAYCELL: + case iCONSTEXPR: + break; + default: + error(29); + break; + } if (!needtoken(']')) break;