Type hint expressions must not be assignment expressions

This commit is contained in:
K. Lange 2021-03-11 21:05:25 +09:00
parent 49ee777c50
commit efdb743c54

View File

@ -943,7 +943,7 @@ static void typeHint(KrkToken name) {
/* Emit name */
emitConstant(OBJECT_VAL(krk_copyString(name.start, name.length)));
expression();
parsePrecedence(PREC_TERNARY);
current = current->enclosed;
current->enclosing->enclosed = NULL;