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

Enum initialized export generates incorrect warning #69118

Closed
PKGaspi opened this issue Nov 24, 2022 · 3 comments · Fixed by #69590
Closed

Enum initialized export generates incorrect warning #69118

PKGaspi opened this issue Nov 24, 2022 · 3 comments · Fixed by #69590

Comments

@PKGaspi
Copy link

PKGaspi commented Nov 24, 2022

Godot version

4.0 beta 6

System information

Linux

Issue description

When exporting a variable of an enum type, in this case:

@export var tween_ease: Tween.EaseType = Tween.EASE_OUT

The console generates the following warning:

W 0:00:00:0329   Integer used when an enum value is expected. If this is intended cast the integer to the enum type.
  <Error de C++> INT_ASSIGNED_TO_ENUM
  <Fuente>       custom_progress_bar.gd:6

Which doesn't really make any sense as no Integer is being cast (?)

Steps to reproduce

  1. Create a GDScript script
  2. Declare and initialize an enum variable as specified above
  3. Run the code and check the warnings

Minimal reproduction project

N/A

@PKGaspi
Copy link
Author

PKGaspi commented Dec 20, 2022

can reproduce in 4.0 beta 9

@anvilfolk
Copy link
Contributor

Fixed by #69590 :)

@akien-mga akien-mga added this to the 4.0 milestone Jan 8, 2023
@anvilfolk
Copy link
Contributor

anvilfolk commented Jan 8, 2023

Actually, can someone reproduce this is beta 10? I think it's been fixed by some other PR, I just happened to check it on mine!

--- Edit ---

Nevermind, I did get the warning on Beta 10 but not on my PR :)

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

Successfully merging a pull request may close this issue.

3 participants