Tests for v1 closed generics/static issues (#8572)

* Add tests to confirm https://github.com/nim-lang/Nim/issues/7231 is fixed.

* Add test for closed https://github.com/nim-lang/Nim/issues/6137

* Add test for https://github.com/nim-lang/Nim/issues/7141
This commit is contained in:
Mamy Ratsimbazafy 2018-08-08 17:49:33 +02:00 • committed by Andreas Rumpf
commit bccaa36aba
3 changed files with 51 additions and 0 deletions

10
tests/generics/t7141.nim Normal file
View file

@ -0,0 +1,10 @@
discard """
action: "reject"
line: 7
errormsg: "cannot instantiate: \'T\'"
"""
proc foo[T](x: T) =
discard
var fun = if true: foo else: foo