intVal works now on enum field symbols (#11403)

* intVal works now on enum field symbols

* disable flakey titerators test
This commit is contained in:
Arne Döring
2019-06-05 14:55:47 +02:00
committed by Andreas Rumpf
parent 9230862534
commit efbf43d4a9
4 changed files with 24 additions and 3 deletions

View File

@@ -1,7 +1,10 @@
discard """
target: "c"
disabled: true
"""
# Timers are always flakey on the testing servers.
import coro
include system/timers

View File

@@ -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)