diff options
author | Araq <rumpf_a@web.de> | 2014-09-14 14:38:11 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-09-14 14:38:11 +0200 |
commit | 113a1c450c40478e532b616778b6f2f8377bfd37 (patch) | |
tree | cf6a67c63cc079ea7c9b5f1b7dc742ff4a0aab80 | |
parent | 1c241e17fe807f9876950731a834f502d3b87804 (diff) | |
download | Nim-113a1c450c40478e532b616778b6f2f8377bfd37.tar.gz |
generic proc type works again
-rw-r--r-- | compiler/semtypes.nim | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 4badf8f4e..83cbca50f 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -819,13 +819,14 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode, result.shouldHaveMeta of tyGenericInvokation: - for i in 1 .. <paramType.sonsLen: - let lifted = liftingWalk(paramType.sons[i]) - if lifted != nil: paramType.sons[i] = lifted - - let expanded = instGenericContainer(c, info, paramType, - allowMetaTypes = true) - result = liftingWalk(expanded, true) + when false: + for i in 1 .. <paramType.sonsLen: + let lifted = liftingWalk(paramType.sons[i]) + if lifted != nil: paramType.sons[i] = lifted + + let expanded = instGenericContainer(c, info, paramType, + allowMetaTypes = true) + result = liftingWalk(expanded, true) of tyUserTypeClass, tyBuiltInTypeClass, tyAnd, tyOr, tyNot: result = addImplicitGeneric(copyType(paramType, getCurrOwner(), true)) |