partial fix for #4623

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

View file

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