Merge ../Nim into devel

This commit is contained in:
Charles Blake
2015-02-14 14:26:16 -05:00
4 changed files with 22 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ proc genVarTuple(p: BProc, n: PNode) =
return
genLineDir(p, n)
initLocExpr(p, n.sons[L-1], tup)
var t = tup.t
var t = tup.t.getUniqueType
for i in countup(0, L-3):
var v = n.sons[i].sym
if sfCompileTime in v.flags: continue

View File

@@ -1597,6 +1597,7 @@ proc parseEnum(p: var TParser): PNode =
optInd(p, result)
while true:
var a = parseSymbol(p)
if a.kind == nkEmpty: return
if p.tok.indent >= 0 and p.tok.indent <= p.currInd:
add(result, a)
break

View File

@@ -0,0 +1,11 @@
discard """
errormsg: "identifier expected, but found 'keyword when'"
"""
# bug #2123
type num = enum
NUM_NONE = 0
NUM_ALL = 1
when defined(macosx): NUM_OSX = 10 # only this differs for real
NUM_XTRA = 20

View File

@@ -0,0 +1,9 @@
# bug #2121
type
Item[K,V] = tuple
key: K
value: V
var q = newseq[Item[int,int]](0)
let (x,y) = q[0]