This commit is contained in:
Andreas Rumpf 2021-06-29 15:34:39 +02:00 • committed by GitHub
commit 97fc95012d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View file

@ -2412,6 +2412,7 @@ proc semWhen(c: PContext, n: PNode, semCheck = true): PNode =
proc semSetConstr(c: PContext, n: PNode): PNode =
result = newNodeI(nkCurly, n.info)
result.typ = newTypeS(tySet, c)
result.typ.flags.incl tfIsConstructor
if n.len == 0:
rawAddSon(result.typ, newTypeS(tyEmpty, c))
else: