You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidmain() {
UserPlan userPlan =UserPlan.free;
userPlan.test(); // Error test method is not found.
}
@EnumTest()
enumUserPlan { free, premium, team, business }
This results into an error where the test method is not found/generated. The same operation on a class with ClassDeclarationsMacro works just fine. It adds a method called test in the class declarations. I was expecting the same with enums. Is this a bug or am I missing something here?
The text was updated successfully, but these errors were encountered:
BirjuVachhani
changed the title
My Enum macro is not working
Issue with EnumDeclarationsMacro
Nov 15, 2024
I was playing with macros on enums with following macro:
Usage:
This results into an error where the
test
method is not found/generated. The same operation on a class withClassDeclarationsMacro
works just fine. It adds a method calledtest
in the class declarations. I was expecting the same with enums. Is this a bug or am I missing something here?The text was updated successfully, but these errors were encountered: