diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-07-09 18:53:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-09 12:53:12 +0200 |
commit | 64815f59b277ce03e7dd74d9d42a9058379852ec (patch) | |
tree | d9e5725502d75f83ca96c3489bfb896be79016b8 /tests | |
parent | 40b58a0a1864e0cc06ecd0ceb8aadf9e933eeb30 (diff) | |
download | Nim-64815f59b277ce03e7dd74d9d42a9058379852ec.tar.gz |
add testcase for #4668 (#14946)
closes #4668 closes #9463
Diffstat (limited to 'tests')
-rw-r--r-- | tests/generics/t4668.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/generics/t4668.nim b/tests/generics/t4668.nim new file mode 100644 index 000000000..0d1b18111 --- /dev/null +++ b/tests/generics/t4668.nim @@ -0,0 +1,16 @@ +discard """ +action: compile +""" + +type + FooObj*[T] = object + v*: T + Foo1*[T] = FooObj[T] + Foo2* = FooObj + +proc foo1(x: Foo1) = echo "foo1" +proc foo2(x: Foo2) = echo "foo2" + +var x: FooObj[float] +foo1(x) # works +foo2(x) # works |