mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Accept non unnamed enums as valid values for enums. Fixes #49357
This commit is contained in:
parent
7f37e2987a
commit
70c5feb32c
1 changed files with 5 additions and 0 deletions
|
|
@ -3499,6 +3499,11 @@ bool GDScriptAnalyzer::is_type_compatible(const GDScriptParser::DataType &p_targ
|
|||
if (p_source.kind == GDScriptParser::DataType::BUILTIN && p_source.builtin_type == Variant::INT) {
|
||||
return true;
|
||||
}
|
||||
if (p_source.kind == GDScriptParser::DataType::ENUM) {
|
||||
if (p_source.native_type == p_target.native_type) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (p_source.kind == GDScriptParser::DataType::ENUM_VALUE) {
|
||||
if (p_source.native_type == p_target.native_type && p_target.enum_values.has(p_source.enum_type)) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue