Nim/tests/generics/tgenericdotrettype.nim
Zahary Karadjov cbf66e99a8 Working test cases for the sophisticated matrix library example from the manual
Fixed the dot operator when used within return types (see tgenericdotrettype)
Fixed the matching of generic concepts aliases used with the implicit generics style
2017-03-24 16:59:47 +02:00

29 lines
342 B
Nim

discard """
output: '''string
int
(int, string)
'''
"""
import typetraits
type
Foo[T, U] = object
x: T
y: U
proc bar[T](a: T): T.U =
echo result.type.name
proc bas(x: auto): x.T =
echo result.type.name
proc baz(x: Foo): (Foo.T, x.U) =
echo result.type.name
var
f: Foo[int, string]
x = bar f
z = bas f
y = baz f