mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 10:54:42 +00:00
16
tests/generics/t4668.nim
Normal file
16
tests/generics/t4668.nim
Normal 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
|
||||
Reference in New Issue
Block a user