diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-02-18 02:46:14 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-02-18 02:46:14 +0200 |
commit | cda92048ba9408d356e0023543fcfb45ea357da8 (patch) | |
tree | 13592e624ea1dcf45346af002a6a699a6429e683 /compiler | |
parent | 4d3846e26b38ddf7fade05489f0f3335db057950 (diff) | |
download | Nim-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.nim | 5 |
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) |