Make global scope enums accessible as types in GDScript
Add functions to CoreConstant so enums can be properly deduced. Also add the enums in release builds to make consistent with ClassDB enums and avoid differences in script compilation between debug and release.
This commit is contained in:
@@ -2,5 +2,5 @@ GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 5
|
||||
>> INT_AS_ENUM_WITHOUT_MATCH
|
||||
>> Cannot cast 2 as Enum "cast_enum_bad_enum.gd::MyEnum": no enum member has matching value.
|
||||
>> Cannot cast 2 as Enum "cast_enum_bad_enum.gd.MyEnum": no enum member has matching value.
|
||||
2
|
||||
|
||||
@@ -2,5 +2,5 @@ GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 4
|
||||
>> INT_AS_ENUM_WITHOUT_MATCH
|
||||
>> Cannot cast 2 as Enum "cast_enum_bad_int.gd::MyEnum": no enum member has matching value.
|
||||
>> Cannot cast 2 as Enum "cast_enum_bad_int.gd.MyEnum": no enum member has matching value.
|
||||
2
|
||||
|
||||
Reference in New Issue
Block a user