Resolve converter call to constants in case arms (#8336)

Fixes #8333
This commit is contained in:
LemonBoy 2018-07-16 16:19:31 +02:00 • committed by Andreas Rumpf
commit 217a2cf098
2 changed files with 14 additions and 1 deletions

10
tests/casestmt/t8333.nim Normal file
View file

@ -0,0 +1,10 @@
discard """
output: "1"
"""
converter toInt*(x: char): int =
x.int
case 0
of 'a': echo 0
else: echo 1