From e97d640ce8a8f16112a3e17241ed89c993f83fee Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 28 Mar 2016 02:13:07 +0200 Subject: [PATCH] fixes #3998 --- compiler/semtypes.nim | 6 ++++-- compiler/sigmatch.nim | 37 ++++++++++++++++++------------------ tests/generics/tcritical.nim | 19 ++++++++++++++++++ 3 files changed, 41 insertions(+), 21 deletions(-) create mode 100644 tests/generics/tcritical.nim diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 62d02fe10e..ba17cc307a 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -831,9 +831,11 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode, result.rawAddSon paramType.lastSon return addImplicitGeneric(result) - result = instGenericContainer(c, paramType.sym.info, result, + let x = instGenericContainer(c, paramType.sym.info, result, allowMetaTypes = true) - result = newTypeWithSons(c, tyCompositeTypeClass, @[paramType, result]) + result = newTypeWithSons(c, tyCompositeTypeClass, @[paramType, x]) + #result = newTypeS(tyCompositeTypeClass, c) + #for i in 0..