Parameters are immutable

It took me a whole day to change one line.
This commit is contained in:
2025-02-09 14:34:44 +11:00
parent f2660b95eb
commit 344c265918

View File

@@ -939,7 +939,7 @@ static void makeFunctionDeclarationStmt(Toy_Bucket** bucketHandle, Toy_Parser* p
//read the type specifier if present //read the type specifier if present
Toy_ValueType varType = TOY_VALUE_ANY; Toy_ValueType varType = TOY_VALUE_ANY;
bool constant = false; bool constant = true; //parameters are immutable
if (match(parser, TOY_TOKEN_OPERATOR_COLON)) { if (match(parser, TOY_TOKEN_OPERATOR_COLON)) {
varType = readType(parser); varType = readType(parser);