Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix enum int comparison #55995

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Fix enum int comparison #55995

merged 1 commit into from
Jan 17, 2022

Conversation

Xwdit
Copy link
Contributor

@Xwdit Xwdit commented Dec 16, 2021

Fix enum int comparison by set the enum value as a int constant

Should Fix #50293

Fix enum int comparison
@Xwdit Xwdit requested a review from a team as a code owner December 16, 2021 15:20
@akien-mga akien-mga added this to the 4.0 milestone Dec 16, 2021
@akien-mga akien-mga merged commit 4cfade6 into godotengine:master Jan 17, 2022
@akien-mga
Copy link
Member

Thanks!

@cdemirer
Copy link
Contributor

cdemirer commented Jan 18, 2022

This leads to #56878.

Enums are particularly tricky at the moment. 2 DataType kinds, ENUM and ENUM_VALUE are currently shared for 3 different things:

  • enum values (Test.One) (currently ENUM_VALUE)
  • variables with enum types (x in var x: Test) (currently ENUM)
  • and the actual enum types themselves (Test) (currently ENUM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GDScript 2.0: Enum values can't be compared to variable integers
4 participants