Added test for #3304
This commit is contained in:
parent
34a783a61c
commit
b6e8a1437b
1 changed files with 15 additions and 0 deletions
15
tests/closure/tclosureinference3304.nim
Normal file
15
tests/closure/tclosureinference3304.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
discard """
|
||||||
|
output: '''@[1, 2, 5]'''
|
||||||
|
"""
|
||||||
|
|
||||||
|
import future, sequtils
|
||||||
|
|
||||||
|
type
|
||||||
|
List[T] = ref object
|
||||||
|
val: T
|
||||||
|
|
||||||
|
proc foo[T](l: List[T]): seq[int] =
|
||||||
|
@[1,2,3,5].filter(x => x != l.val)
|
||||||
|
|
||||||
|
when isMainModule:
|
||||||
|
echo(foo(List[int](val: 3)))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue