intVal works now on enum field symbols (#11403)
* intVal works now on enum field symbols * disable flakey titerators test
This commit is contained in:
parent
9230862534
commit
efbf43d4a9
4 changed files with 24 additions and 3 deletions
|
|
@ -1,7 +1,10 @@
|
|||
discard """
|
||||
target: "c"
|
||||
disabled: true
|
||||
"""
|
||||
|
||||
# Timers are always flakey on the testing servers.
|
||||
|
||||
import coro
|
||||
include system/timers
|
||||
|
||||
|
|
|
|||
|
|
@ -93,3 +93,14 @@ static:
|
|||
quit("may not be evaluated")
|
||||
|
||||
assert( (myLit or bottom()) == myLit )
|
||||
|
||||
type
|
||||
Fruit = enum
|
||||
apple
|
||||
banana
|
||||
orange
|
||||
|
||||
macro foo(x: typed) =
|
||||
doAssert Fruit(x.intVal) == banana
|
||||
|
||||
foo(banana)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue