diff options
author | Araq <rumpf_a@web.de> | 2013-05-27 23:16:00 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-05-27 23:16:00 +0200 |
commit | e1b668c868dbc647bb5da98d8e4769c2c9b351fd (patch) | |
tree | c1b4ca3a7fa14fa4aa3ec6b36bd85a693f511b46 /compiler | |
parent | 66653e8f144f2e67a6e48158f9298d9f41b16b09 (diff) | |
download | Nim-e1b668c868dbc647bb5da98d8e4769c2c9b351fd.tar.gz |
Revert "test cases for the new features"
This reverts commit 66653e8f144f2e67a6e48158f9298d9f41b16b09.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semexprs.nim | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 0ac71bedf..daad93a85 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -111,11 +111,7 @@ proc semSym(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode = # var len = 0 # but won't be called # genericThatUsesLen(x) # marked as taking a closure? of skGenericParam: - if s.typ.kind == tyExpr: - result = newSymNode(s, n.info) - result.typ = s.typ.lastSon - elif s.ast != nil: - result = semExpr(c, s.ast) + if s.ast != nil: result = semExpr(c, s.ast) else: InternalError(n.info, "no default for") result = emptyNode @@ -887,13 +883,10 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode = let tbody = ty.sons[0] for s in countup(0, tbody.len-2): let tParam = tbody.sons[s] + assert tParam.kind == tyGenericParam if tParam.sym.name == i: - let rawTyp = ty.sons[s + 1] - if rawTyp.kind == tyExpr: - return rawTyp.n - else: - let foundTyp = makeTypeDesc(c, rawTyp) - return newSymNode(copySym(tParam.sym).linkTo(foundTyp), n.info) + let foundTyp = makeTypeDesc(c, ty.sons[s + 1]) + return newSymNode(copySym(tParam.sym).linkTo(foundTyp), n.info) return else: # echo "TYPE FIELD ACCESS" |