This commit is contained in:
Araq 2019-01-14 12:15:29 +01:00
commit 825e08b046
3 changed files with 23 additions and 9 deletions

View file

@ -77,3 +77,13 @@ block tstar:
# check that it's been optimized properly:
doAssert calls == 1
# bug #7524
template in_to_out(typIn, typOut: typedesc) =
proc to_out(x: typIn{lit}): typOut = result = ord(x)
# Generating the proc via template doesn't work
in_to_out(char, int)
# This works
proc to_out2(x: char{lit}): int = result = ord(x)