diff options
| author | Yong He <yonghe@outlook.com> | 2022-11-08 10:07:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-08 10:07:57 -0800 |
| commit | bf67309454032b4f92d0bc9735b608e56b16882f (patch) | |
| tree | a321fe7db0b49fa67608b935c1389354a020f59c /source/slang/slang-check-overload.cpp | |
| parent | ca882a1ef46a5a8bbff50e3a1a6f973e16358634 (diff) | |
Make `__BuiltinFloatingPointType` conform to `IDifferentiable`. (#2499)
Diffstat (limited to 'source/slang/slang-check-overload.cpp')
| -rw-r--r-- | source/slang/slang-check-overload.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp index 42fab94a6..38754d170 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -1573,10 +1573,15 @@ namespace Slang { for (auto item : overloadExpr->lookupResult2.items) { + auto funcType = as<FuncType>(GetTypeForDeclRef(item.declRef, item.declRef.decl->loc)); + if (!funcType) + continue; + funcType = as<FuncType>(processJVPFuncType(funcType)); + if (!funcType) + continue; OverloadCandidate candidate; candidate.flavor = OverloadCandidate::Flavor::Expr; - candidate.funcType = as<FuncType>(processJVPFuncType( - as<FuncType>(GetTypeForDeclRef(item.declRef, item.declRef.decl->loc)))); + candidate.funcType = funcType; candidate.resultType = candidate.funcType->getResultType(); candidate.item = LookupResultItem(item.declRef); |
