Do not crash while instantiating a generic outside a call (#8279)

Fixes #8270
This commit is contained in:
LemonBoy 2018-07-14 01:44:40 +02:00 • committed by Andreas Rumpf
commit 9b98add6c7
2 changed files with 11 additions and 1 deletions

7
tests/generics/t8270.nim Normal file
View file

@ -0,0 +1,7 @@
discard """
line: 6
errormsg: "cannot instantiate: \'T\'"
"""
proc m[T](x: T): int = discard
echo [m]