This commit is contained in:
Araq 2015-01-31 16:23:38 +01:00
commit ab5b8f5391
2 changed files with 22 additions and 5 deletions

View file

@ -0,0 +1,15 @@
# bug #1988
template t(e: expr) = discard
proc positive(x: int): int = +x
proc negative(x: int): int = -x
proc negative(x: float): float = -x
proc p1 = t(negative)
proc p2[X] = t(positive)
proc p3[X] = t(negative)
p1() # This compiles.
p2[int]() # This compiles.
p3[int]() # This raises an error.