add testcase for #4668 (#14946)

closes #4668
closes #9463
This commit is contained in:
flywind 2020-07-09 18:53:12 +08:00 • committed by GitHub
commit 64815f59b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

16
tests/generics/t4668.nim Normal file
View file

@ -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