Skip to content

Commit

Permalink
should fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Dec 18, 2023
1 parent 341b04d commit 98f71e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion compiler/semexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,10 @@ proc afterCallActions(c: PContext; n, orig: PNode, flags: TExprFlags; expectedTy
of skMacro: result = semMacroExpr(c, result, orig, callee, flags, expectedType)
of skTemplate: result = semTemplateExpr(c, result, callee, flags, expectedType)
else:
semFinishOperands(c, result)
if callee.magic notin {mArrGet, mArrPut, mNBindSym}:
# calls to `[]` can be explicit generic instantiations,
# don't sem every operand now, leave it to semmagic
semFinishOperands(c, result)
activate(c, result)
fixAbstractType(c, result)
analyseIfAddressTakenInCall(c, result)
Expand Down
10 changes: 5 additions & 5 deletions compiler/semgnrc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym,
result.transitionSonsKind(nkClosedSymChoice)
else:
result = symChoice(c, n, s, scOpen)
if withinMixin in flags and result.kind == nkSym:
if {withinMixin, withinConcept} * flags == {withinMixin} and result.kind == nkSym:
result.flags.incl nfOpenSym
result.typ = nil
case s.kind
Expand Down Expand Up @@ -99,7 +99,7 @@ proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym,
result = n
else:
result = newSymNodeTypeDesc(s, c.idgen, n.info)
if withinMixin in flags:
if {withinMixin, withinConcept} * flags == {withinMixin}:
result.flags.incl nfOpenSym
result.typ = nil
onUse(n.info, s)
Expand All @@ -110,15 +110,15 @@ proc semGenericStmtSymbol(c: PContext, n: PNode, s: PSym,
if (s.typ != nil) and
(s.typ.flags * {tfGenericTypeParam, tfImplicitTypeParam} == {}):
result = newSymNodeTypeDesc(s, c.idgen, n.info)
if withinMixin in flags:
if {withinMixin, withinConcept} * flags == {withinMixin}:
result.flags.incl nfOpenSym
result.typ = nil
else:
result = n
onUse(n.info, s)
else:
result = newSymNode(s, n.info)
if withinMixin in flags:
if {withinMixin, withinConcept} * flags == {withinMixin}:
result.flags.incl nfOpenSym
result.typ = nil
onUse(n.info, s)
Expand Down Expand Up @@ -245,7 +245,7 @@ proc semGenericStmt(c: PContext, n: PNode,
if s2 != nil and s2 != a and not c.isAmbiguous and s2.owner == c.p.owner:
n.sym = s2
a = s2
if withinMixin notin flags:
if {withinMixin, withinConcept} * flags != {withinMixin}:
n.flags.excl nfOpenSym
let b = getGenSym(c, a)
if b != a: n.sym = b
Expand Down

0 comments on commit 98f71e1

Please sign in to comment.