Skip to content

Commit

Permalink
replace transitionRoutineSymKind call in newSymGNode with transitionS…
Browse files Browse the repository at this point in the history
…ymKindCommon
  • Loading branch information
bung87 committed Sep 28, 2023
1 parent 0a1b7e4 commit 35b4d59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions compiler/ast/ast.nim
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ template transitionSymKindCommon*(k: TSymKind) =
when defined(nimsuggest):
s.allUsages = obj.allUsages

proc transitionSymKindCommon*(s: PSym, kind: TSymKind) =
transitionSymKindCommon(kind)

proc transitionGenericParamToType*(s: PSym) =
transitionSymKindCommon(skType)

Expand Down
2 changes: 1 addition & 1 deletion compiler/sem/sem.nim
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ proc newSymGNode*(kind: TSymKind, n: PNode, c: PContext): PNode =
n
else:
let recoverySym = copySym(n.sym, nextSymId c.idgen)
recoverySym.transitionRoutineSymKind(kind)
recoverySym.transitionSymKindCommon(kind)
recoverySym.owner = currOwner
c.config.makeError(n, recoverySym, ExpectedKindMismatch)
of nkIdent, nkAccQuoted:
Expand Down

0 comments on commit 35b4d59

Please sign in to comment.