summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-check-overload.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-11-01 08:46:57 -0700
committerGitHub <noreply@github.com>2022-11-01 08:46:57 -0700
commitcbc1eff56057f199183bb7c17d8a360326512367 (patch)
tree487865e928cd2ceecbb509f0bfd06aa8d9584411 /source/slang/slang-check-overload.cpp
parentb707a07b1de3535cb0a8ccb6fe2ed4afa4a016d1 (diff)
Make `DifferentialPair` able to nest. (#2477)
Diffstat (limited to 'source/slang/slang-check-overload.cpp')
-rw-r--r--source/slang/slang-check-overload.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp
index ef067c06c..42fab94a6 100644
--- a/source/slang/slang-check-overload.cpp
+++ b/source/slang/slang-check-overload.cpp
@@ -1559,7 +1559,7 @@ namespace Slang
OverloadCandidate candidate;
candidate.flavor = OverloadCandidate::Flavor::Expr;
- candidate.funcType = as<FuncType>(processJVPFuncType(this->getASTBuilder(), origFuncType));
+ candidate.funcType = as<FuncType>(processJVPFuncType(origFuncType));
candidate.resultType = candidate.funcType->getResultType();
candidate.item = LookupResultItem(baseFuncDeclRef);
@@ -1576,7 +1576,6 @@ namespace Slang
OverloadCandidate candidate;
candidate.flavor = OverloadCandidate::Flavor::Expr;
candidate.funcType = as<FuncType>(processJVPFuncType(
- this->getASTBuilder(),
as<FuncType>(GetTypeForDeclRef(item.declRef, item.declRef.decl->loc))));
candidate.resultType = candidate.funcType->getResultType();
candidate.item = LookupResultItem(item.declRef);
@@ -1606,7 +1605,7 @@ namespace Slang
auto funcType = getFuncType(this->getASTBuilder(), unspecializedInnerRef.as<CallableDecl>());
// Process func type to generate JVP func type.
- auto jvpFuncType = as<FuncType>(processJVPFuncType(this->getASTBuilder(), funcType));
+ auto jvpFuncType = as<FuncType>(processJVPFuncType(funcType));
// Extract parameter list from processed type.
List<Type*> paramTypes;
@@ -1631,7 +1630,6 @@ namespace Slang
// This could potentially be a declRef.substitute(jvpFuncType)
//
candidate.funcType = as<FuncType>(processJVPFuncType(
- this->getASTBuilder(),
getFuncType(this->getASTBuilder(), innerRef.as<CallableDecl>())));
candidate.resultType = candidate.funcType->getResultType();