summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2014-02-18 02:46:14 +0200
committerZahary Karadjov <zahary@gmail.com>2014-02-18 02:46:14 +0200
commitcda92048ba9408d356e0023543fcfb45ea357da8 (patch)
tree13592e624ea1dcf45346af002a6a699a6429e683 /compiler
parent4d3846e26b38ddf7fade05489f0f3335db057950 (diff)
downloadNim-cda92048ba9408d356e0023543fcfb45ea357da8.tar.gz
fix some trivial errors in the test suite and some more regressions caused by tyTypeDesc[tyNone]
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semtypes.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 184aca4f8..98abaf005 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -669,7 +669,7 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
   of tyTypeDesc:
     if tfUnresolved notin paramType.flags:
       # naked typedescs are not bindOnce types
-      if paramType.sonsLen == 0 and paramTypId != nil and
+      if paramType.base.kind == tyNone and paramTypId != nil and
          paramTypId.id == typedescId.id: paramTypId = nil
       result = addImplicitGeneric(c.newTypeWithSons(tyTypeDesc, paramType.sons))
   
@@ -1011,7 +1011,8 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
     of mOrdinal: result = semOrdinal(c, n, prev)
     of mSeq: result = semContainer(c, n, tySequence, "seq", prev)
     of mVarargs: result = semVarargs(c, n, prev)
-    of mExpr, mTypeDesc:
+    of mTypeDesc: result = makeTypeDesc(c, semTypeNode(c, n[1], nil))
+    of mExpr:
       result = semTypeNode(c, n.sons[0], nil)
       if result != nil:
         result = copyType(result, getCurrOwner(), false)