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

GDScript: Allow casting enum to int #90580

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

vnen
Copy link
Member

@vnen vnen commented Apr 12, 2024

An enum value is always an integer so the cast is valid. The code here now consider this case to avoid giving an error message.

Fix #85882

An enum value is always an integer so the cast is valid. The code here
now consider this case to avoid giving an error message.
@vnen vnen added this to the 4.3 milestone Apr 12, 2024
@vnen vnen requested a review from a team as a code owner April 12, 2024 14:50
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love the way the test cases help review the code. We could write more test cases in other prs.

@akien-mga akien-mga merged commit c9a595a into godotengine:master Apr 13, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@vnen vnen deleted the gdscript-allow-enum-to-int-cast branch April 15, 2024 11:42
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: Casting an enum type to an int generates an error.
4 participants