Fix tests/parallel/tguard2.nim
This commit is contained in:
parent
2b66d66567
commit
d374c6373b
3 changed files with 5 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ type
|
||||||
# to the user.
|
# to the user.
|
||||||
efWantStmt, efAllowStmt, efDetermineType, efExplain,
|
efWantStmt, efAllowStmt, efDetermineType, efExplain,
|
||||||
efAllowDestructor, efWantValue, efOperand, efNoSemCheck,
|
efAllowDestructor, efWantValue, efOperand, efNoSemCheck,
|
||||||
efNoEvaluateGeneric, efInCall, efFromHlo,
|
efNoEvaluateGeneric, efInCall, efFromHlo, efNoSem2Check,
|
||||||
efNoUndeclared
|
efNoUndeclared
|
||||||
# Use this if undeclared identifiers should not raise an error during
|
# Use this if undeclared identifiers should not raise an error during
|
||||||
# overload resolution.
|
# overload resolution.
|
||||||
|
|
|
||||||
|
|
@ -2082,7 +2082,7 @@ proc tryExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
|
||||||
var err: string
|
var err: string
|
||||||
try:
|
try:
|
||||||
result = semExpr(c, n, flags)
|
result = semExpr(c, n, flags)
|
||||||
if result != nil:
|
if result != nil and efNoSem2Check notin flags:
|
||||||
trackStmt(c, c.module, result, isTopLevel = false)
|
trackStmt(c, c.module, result, isTopLevel = false)
|
||||||
if c.config.errorCounter != oldErrorCount:
|
if c.config.errorCounter != oldErrorCount:
|
||||||
result = nil
|
result = nil
|
||||||
|
|
|
||||||
|
|
@ -1937,7 +1937,9 @@ proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType,
|
||||||
var call = newNodeI(nkCall, arg.info)
|
var call = newNodeI(nkCall, arg.info)
|
||||||
call.add(f.n.copyTree)
|
call.add(f.n.copyTree)
|
||||||
call.add(arg.copyTree)
|
call.add(arg.copyTree)
|
||||||
result = c.semTryExpr(c, call)
|
# XXX: This would be much nicer if we don't use `semTryExpr` and
|
||||||
|
# instead we directly search for overloads with `resolveOverloads`:
|
||||||
|
result = c.semTryExpr(c, call, {efNoSem2Check})
|
||||||
|
|
||||||
if result != nil:
|
if result != nil:
|
||||||
if result.typ == nil: return nil
|
if result.typ == nil: return nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue