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:
parent
506418ef53
commit
bccaa36aba
3 changed files with 51 additions and 0 deletions
10
tests/generics/t7141.nim
Normal file
10
tests/generics/t7141.nim
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue