From 698785ef5e560d533c6aec6b1f0e9125fb7afe2a Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sat, 29 Sep 2012 17:37:55 +0300 Subject: bugfix: allow tuple constructors in generic code --- tests/run/trettypeinference.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/run') diff --git a/tests/run/trettypeinference.nim b/tests/run/trettypeinference.nim index eea5b597d..41b4aa5ef 100644 --- a/tests/run/trettypeinference.nim +++ b/tests/run/trettypeinference.nim @@ -6,12 +6,16 @@ discard """ import typetraits proc plus(a, b): auto = a + b +proc makePair(a, b): auto = (first: a, second: b) proc `+`(a, b: string): seq[string] = @[a, b] var i = plus(10, 20) var s = plus("A", "B") +var p = makePair("key", 100) +static: assert p[0].type is string + echo i.type.name echo s.type.name -- cgit 1.4.1-2-gfad0