Skip to content

Commit

Permalink
Fixes #12832 (#12842) [backport]
Browse files Browse the repository at this point in the history
* Fix #12832
* nimVm -> nimvm in json.nim
* Use suggestSym() instead of markUsed(); Also use styleCheckUse() for finding style violations
  • Loading branch information
nc-x authored and Araq committed Dec 8, 2019
1 parent 73dd348 commit ff5ef95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions compiler/semtempl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ proc semTemplSymbol(c: PContext, n: PNode, s: PSym; isField: bool): PNode =
else:
if isField and sfGenSym in s.flags: result = n
else: result = newSymNode(s, n.info)
# Issue #12832
when defined(nimsuggest):
suggestSym(c.config, n.info, s, c.graph.usageSym, false)
if {optStyleHint, optStyleError} * c.config.globalOptions != {}:
styleCheckUse(c.config, n.info, s)

proc semRoutineInTemplName(c: var TemplCtx, n: PNode): PNode =
result = n
Expand Down
2 changes: 1 addition & 1 deletion lib/pure/json.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ when defined(nimFixedForwardGeneric):
when defined js:
`tmpSym`.`kindSym` = kindTmp
else:
when nimVm:
when nimvm:
`tmpSym`.`kindSym` = kindTmp
else:
# fuck it, assign kind field anyway
Expand Down

0 comments on commit ff5ef95

Please sign in to comment.