This commit is contained in:
Andreas Rumpf 2019-05-24 08:19:05 +02:00 • committed by GitHub
commit 39a3dbb16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 2 deletions

View file

@ -2598,9 +2598,10 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
result = semTemplateExpr(c, n, s, flags)
of skType:
# XXX think about this more (``set`` procs)
if n.len == 2:
let ambig = contains(c.ambiguousSymbols, s.id)
if not (n[0].kind in {nkClosedSymChoice, nkOpenSymChoice, nkIdent} and ambig) and n.len == 2:
result = semConv(c, n)
elif contains(c.ambiguousSymbols, s.id) and n.len == 1:
elif ambig and n.len == 1:
errorUseQualifier(c, n.info, s)
elif n.len == 1:
result = semObjConstr(c, n, flags)