diff options
author | Neelesh Chandola <neelesh.chandola@outlook.com> | 2019-12-09 03:57:25 +0530 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-12-08 23:27:25 +0100 |
commit | ff5ef95414e48714efd0ce2b3b694de1017032dc (patch) | |
tree | 730e313294d413ddcf92463026e0098cc01c8a5c | |
parent | 73dd348dddfb552147be133f86834c016b001dda (diff) | |
download | Nim-ff5ef95414e48714efd0ce2b3b694de1017032dc.tar.gz |
Fixes #12832 (#12842) [backport]
* Fix #12832 * nimVm -> nimvm in json.nim * Use suggestSym() instead of markUsed(); Also use styleCheckUse() for finding style violations
-rw-r--r-- | compiler/semtempl.nim | 5 | ||||
-rw-r--r-- | lib/pure/json.nim | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim index 853bc3da7..fbeae2b07 100644 --- a/compiler/semtempl.nim +++ b/compiler/semtempl.nim @@ -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 diff --git a/lib/pure/json.nim b/lib/pure/json.nim index ff65787d2..5b6cf0856 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -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 |