renamed inCompilesContext to compilesContextId; added test case for #3313
This commit is contained in:
parent
5b2f54ffa1
commit
c921f30b1d
7 changed files with 112 additions and 14 deletions
|
|
@ -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.inCompilesContext > 0:
|
||||
if c.compilesContextId > 0:
|
||||
# fail fast:
|
||||
globalError(n.info, errTypeMismatch, "")
|
||||
if errors.isNil or errors.len == 0:
|
||||
|
|
@ -235,7 +235,7 @@ proc resolveOverloads(c: PContext, n, orig: PNode,
|
|||
internalAssert result.state == csMatch
|
||||
#writeMatches(result)
|
||||
#writeMatches(alt)
|
||||
if c.inCompilesContext > 0:
|
||||
if c.compilesContextId > 0:
|
||||
# quick error message for performance of 'compiles' built-in:
|
||||
globalError(n.info, errGenerated, "ambiguous call")
|
||||
elif gErrorCounter == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue