Skip to content

Commit

Permalink
fix miss parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
bung87 committed Oct 3, 2023
1 parent 7682b9d commit 07681ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/front/msgs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -600,18 +600,18 @@ proc report*(conf: ConfigRef, node: PNode): TErrorHandling =
assert node.kind == nkError
return conf.report(conf.astDiagToLegacyReport(conf, node.diag))

proc fillReport(r: var Report, reportFrom: InstantiationInfo) =
proc fillReport(c: ConfigRef, r: var Report, reportFrom: InstantiationInfo) =
r.reportFrom = toReportLineInfo(reportFrom)
if r.category in { repSem, repVM } and r.location.isSome():
r.context = conf.getContext(r.location.get())
r.context = c.getContext(r.location.get())

proc handleReport*(
conf: ConfigRef,
r: Report,
reportFrom: InstantiationInfo,
eh: TErrorHandling = doNothing) {.noinline.} =
var rep = r
fillReport(rep, reportFrom)
fillReport(conf, rep, reportFrom)
if rep.category == repVM and rep.vmReport.trace != nil:
handleReport(conf, wrap(rep.vmReport.trace[]), reportFrom)

Expand Down Expand Up @@ -661,7 +661,7 @@ proc reportAndForceRaise*(
## always call `raiseRecoverableError` except if `doAbort` was returned
## by the `structuredReportHook`.
var rep = r
fillReport(rep, reportFrom)
fillReport(conf, rep, reportFrom)

if rep.category == repVM and rep.vmReport.trace != nil:
reportAndForceRaise(conf, wrap(rep.vmReport.trace[]), reportFrom)
Expand Down

0 comments on commit 07681ff

Please sign in to comment.