Closed trdthg closed 2 months ago
enum func_two_id with f -> int, g -> int, = {
fti => (1, 2),
fti2 => (3, 4),
}
The way it's intended to work is that this will generate two functions f
and g
that convert the enumeration members into integers, so for the above you would have:
f(fti) == 1
f(fti2) == 3
g(fti) == 2
g(fti2) == 4
Hopefully that makes sense?
Thanks, then there's no problem :D. (Looking forward to adding it to the docs in the future)
I'm doing some test on enum
I've checked the manual
I think the following sail code should be ok:
But there is the error msg:
I checked the related source code(please ignore the changes here):
And the following code is ok:
So, is this the correct syntax? Or is there something wrong with initial_check?
If this is a bug, I can help to fix