We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Operating system or device, Godot version, GPU Model and driver (if graphics related): Windows 10. Godot 3.0alpha1
Issue description:
Enum values can't be used as match patterns. The error is: Parse Error: Only constant expressions or variables allowed in a pattern
Parse Error: Only constant expressions or variables allowed in a pattern
The match documentation says that it should be possible under the variable pattern: matches the contents of a variable/enum
match
matches the contents of a variable/enum
Steps to reproduce:
extends Node enum Action { Up, Down } var current_action = Action.Up func something(): match current_action: Action.Up: # Error here pass _: pass
The text was updated successfully, but these errors were encountered:
There's actually a PR already to fix that :) #10542
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Operating system or device, Godot version, GPU Model and driver (if graphics related):
Windows 10. Godot 3.0alpha1
Issue description:
Enum values can't be used as match patterns. The error is:
Parse Error: Only constant expressions or variables allowed in a pattern
The
match
documentation says that it should be possible under the variable pattern:matches the contents of a variable/enum
Steps to reproduce:
The text was updated successfully, but these errors were encountered: