summary refs log tree commit diff stats
path: root/tests/closure/tclosureinference3304.nim
blob: db4aa1d04d415f93ae7418f97f90409605ada47e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)))