This commit is contained in:
Zahary Karadjov 2017-04-07 20:00:20 +03:00
commit 0b7321651e
3 changed files with 36 additions and 4 deletions

22
tests/types/thard_tyforward.nim Executable file
View file

@ -0,0 +1,22 @@
type
Bar[T] = Foo[T, T]
Baz[T] = proc (x: Foo[T, T])
GenericAlias[T] = Foo[T]
GenericAlias2[T] = Foo[Baz[T]]
Concrete1 = Foo[int, float]
Concrete2 = proc(x: proc(a: Foo[int, float]))
Foo[T, U] = object
x: T
y: U
var
x1: Bar[float]
x2: Baz[int]
x3: Concrete1
x4: Concrete2
x5: GenericAlias[int]
x6: GenericAlias2[string]