partial fix for #4623

This commit is contained in:
Andreas Rumpf
2016-08-26 15:39:21 +02:00
parent da8f6e16cc
commit afb0d2e145

View File

@@ -110,6 +110,8 @@ proc semContainer(c: PContext, n: PNode, kind: TTypeKind, kindStr: string,
result = newOrPrevType(kind, prev, c)
if sonsLen(n) == 2:
var base = semTypeNode(c, n.sons[1], nil)
if base.kind == tyVoid:
localError(n.info, errTIsNotAConcreteType, typeToString(base))
addSonSkipIntLit(result, base)
else:
localError(n.info, errXExpectsOneTypeParam, kindStr)