cgen error when trying to use enum key prematurely #21912
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: Checker
Bugs/feature requests, that are related to the type checker.
Describe the bug
When trying to find out how to have enum aliases, I found a way by using
key2 = int(MyEnum.key1)
, after testing it a bit further a cgen error appeared when putting key2 before key1.Reproduction Steps
Code: https://play.vlang.io/p/371a7f8fd6
Expected Behavior
A checker error is expected
Current Behavior
Output:
Possible Solution
Additional Information/Context
V version
V 0.4.6 fd7986c
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: