diff options
| author | Yong He <yonghe@outlook.com> | 2025-02-24 12:51:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-24 12:51:51 -0800 |
| commit | 9e465c776af22ff7a19818b1b135b9e5287aa603 (patch) | |
| tree | d102c731f6c6c614199aeb44cf4683b58c3268df /source/slang/slang-check-overload.cpp | |
| parent | edcb2f0b8216f964f10ba60d96b8070fdc1ae257 (diff) | |
Fix TypeCheckingCache concurrency and candidate lifetime. (#6444)
* Fix TypeCheckingCache concurrency.
* Fix.
Diffstat (limited to 'source/slang/slang-check-overload.cpp')
| -rw-r--r-- | source/slang/slang-check-overload.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp index f548fb819..01cd303c7 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -2565,7 +2565,7 @@ Expr* SemanticsVisitor::ResolveInvoke(InvokeExpr* expr) // We should only use the cached candidate if it is persistent direct declref // created from GlobalSession's ASTBuilder, or it is created in the current Linkage. if (candidate.cacheVersion == typeCheckingCache->version || - as<DirectDeclRef>(candidate.candidate.item.declRef.declRefBase)) + findNextOuterGeneric(candidate.decl) == nullptr) { context.bestCandidateStorage = candidate.candidate; context.bestCandidate = &context.bestCandidateStorage; |
