diff options
Diffstat (limited to 'compiler/semcall.nim')
-rw-r--r-- | compiler/semcall.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/semcall.nim b/compiler/semcall.nim index 381093531..d8838e347 100644 --- a/compiler/semcall.nim +++ b/compiler/semcall.nim @@ -95,7 +95,7 @@ proc notFoundError*(c: PContext, n: PNode, errors: CandidateErrors) = # Gives a detailed error message; this is separated from semOverloadedCall, # as semOverlodedCall is already pretty slow (and we need this information # only in case of an error). - if c.compilesContextId > 0: + if c.compilesContextId > 0 and optReportConceptFailures notin gGlobalOptions: # fail fast: globalError(n.info, errTypeMismatch, "") if errors.isNil or errors.len == 0: @@ -133,7 +133,10 @@ proc notFoundError*(c: PContext, n: PNode, errors: CandidateErrors) = add(candidates, "\n") if candidates != "": add(result, "\n" & msgKindToString(errButExpected) & "\n" & candidates) - localError(n.info, errGenerated, result) + if c.compilesContextId > 0 and optReportConceptFailures in gGlobalOptions: + globalError(n.info, errGenerated, result) + else: + localError(n.info, errGenerated, result) proc gatherUsedSyms(c: PContext, usedSyms: var seq[PNode]) = for scope in walkScopes(c.currentScope): |