Merge pull request #69590 from anvilfolk/enums

GDScript enum fixes & refactor
This commit is contained in:
Rémi Verschelde 2023-01-09 23:10:37 +01:00
commit 509da86205
No known key found for this signature in database
GPG key ID: C3336907360768E1
61 changed files with 699 additions and 97 deletions

View file

@ -213,7 +213,7 @@ static bool _have_exact_arguments(const MethodBind *p_method, const Vector<GDScr
}
GDScriptCodeGenerator::Address GDScriptCompiler::_parse_expression(CodeGen &codegen, Error &r_error, const GDScriptParser::ExpressionNode *p_expression, bool p_root, bool p_initializer, const GDScriptCodeGenerator::Address &p_index_addr) {
if (p_expression->is_constant) {
if (p_expression->is_constant && !p_expression->get_datatype().is_meta_type) {
return codegen.add_constant(p_expression->reduced_value);
}