summary refs log tree commit diff stats
path: root/tests/concepts/t1128.nim
blob: 7f7525a13488004277eacd5e4d3716d3252363c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
  output: "true\ntrue"
"""

type
  TFooContainer[T] = object
  
  TContainer[T] = generic var c
    foo(c, T)

proc foo[T](c: var TFooContainer[T], val: T) =
  discard

proc bar(c: var TContainer) =
  discard

var fooContainer: TFooContainer[int]
echo fooContainer is TFooContainer # true.
echo fooContainer is TFooContainer[int] # true.
fooContainer.bar()