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 /compiler | |
parent | 7e44015491d4002be3c80cb7d6797e4c63651fbe (diff) | |
download | Nim-698785ef5e560d533c6aec6b1f0e9125fb7afe2a.tar.gz |
bugfix: allow tuple constructors in generic code
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/semgnrc.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim index 2751aa1e1..dde799ab3 100755 --- a/compiler/semgnrc.nim +++ b/compiler/semgnrc.nim @@ -306,6 +306,9 @@ proc semGenericStmt(c: PContext, n: PNode, n.sons[bodyPos] = semGenericStmtScope(c, body, flags, toBind) closeScope(c.tab) of nkPragma, nkPragmaExpr: nil + of nkExprColonExpr: + checkMinSonsLen(n, 2) + result.sons[1] = semGenericStmt(c, n.sons[1], flags, toBind) else: for i in countup(0, sonsLen(n) - 1): result.sons[i] = semGenericStmt(c, n.sons[i], flags, toBind) |