static[T] related fixes (#15853)
* close #9679 * close #7546 * close #9520 * close #6177
This commit is contained in:
parent
fa5f225efc
commit
cdd459dd60
2 changed files with 102 additions and 1 deletions
|
|
@ -159,7 +159,7 @@ proc semSet(c: PContext, n: PNode, prev: PType): PType =
|
|||
var base = semTypeNode(c, n[1], nil)
|
||||
addSonSkipIntLit(result, base, c.idgen)
|
||||
if base.kind in {tyGenericInst, tyAlias, tySink}: base = lastSon(base)
|
||||
if base.kind != tyGenericParam:
|
||||
if base.kind notin {tyGenericParam, tyGenericInvocation}:
|
||||
if not isOrdinalType(base, allowEnumWithHoles = true):
|
||||
localError(c.config, n.info, errOrdinalTypeExpected)
|
||||
elif lengthOrd(c.config, base) > MaxSetElements:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue