diff options
author | Zahary Karadjov <zahary@gmail.com> | 2012-09-29 17:37:55 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2012-10-03 01:59:49 +0300 |
commit | 698785ef5e560d533c6aec6b1f0e9125fb7afe2a (patch) | |
tree | 4e73a4c862fde97900e18933d1a69a625b8a1840 /tests/run | |
parent | 7e44015491d4002be3c80cb7d6797e4c63651fbe (diff) | |
download | Nim-698785ef5e560d533c6aec6b1f0e9125fb7afe2a.tar.gz |
bugfix: allow tuple constructors in generic code
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/trettypeinference.nim | 4 |
1 files changed, 4 insertions, 0 deletions
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 |