Skip to content

Commit d9eed54

Browse files
committed
Fix tests/parallel/tguard2.nim
1 parent 594d2e1 commit d9eed54

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

compiler/semdata.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type
6363
# to the user.
6464
efWantStmt, efAllowStmt, efDetermineType, efExplain,
6565
efAllowDestructor, efWantValue, efOperand, efNoSemCheck,
66-
efNoEvaluateGeneric, efInCall, efFromHlo,
66+
efNoEvaluateGeneric, efInCall, efFromHlo, efNoSem2Check,
6767
efNoUndeclared
6868
# Use this if undeclared identifiers should not raise an error during
6969
# overload resolution.

compiler/semexprs.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2079,7 +2079,7 @@ proc tryExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode =
20792079
var err: string
20802080
try:
20812081
result = semExpr(c, n, flags)
2082-
if result != nil:
2082+
if result != nil and efNoSem2Check notin flags:
20832083
trackStmt(c, c.module, result, isTopLevel = false)
20842084
if c.config.errorCounter != oldErrorCount:
20852085
result = nil

compiler/sigmatch.nim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,9 @@ proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType,
19351935
var call = newNodeI(nkCall, arg.info)
19361936
call.add(f.n.copyTree)
19371937
call.add(arg.copyTree)
1938-
result = c.semTryExpr(c, call)
1938+
# XXX: This would be much nicer if we don't use `semTryExpr` and
1939+
# instead we directly search for overloads with `resolveOverloads`:
1940+
result = c.semTryExpr(c, call, {efNoSem2Check})
19391941

19401942
if result != nil:
19411943
if result.typ == nil: return nil

0 commit comments

Comments
 (0)