GDScript: Add static typing for for loop variable

This commit is contained in:
Danil Alexeev 2023-08-04 12:19:11 +03:00
parent 0511f9d9a7
commit 6c59ed9485
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
20 changed files with 177 additions and 17 deletions

View file

@ -1953,13 +1953,13 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Sui
return err;
}
gen->write_for_assignment(iterator, list);
gen->write_for_assignment(list);
if (list.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
codegen.generator->pop_temporary();
}
gen->write_for();
gen->write_for(iterator, for_n->use_conversion_assign);
err = _parse_block(codegen, for_n->loop);
if (err) {