diff options
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/slang-check-expr.cpp | 8 | ||||
| -rw-r--r-- | source/slang/slang-check-overload.cpp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 2c6899269..1f0e1a2dc 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -1054,6 +1054,14 @@ namespace Slang { return overloadedExpr2->base; } + else if (auto genApp = as<GenericAppExpr>(expr)) + { + return GetBaseExpr(genApp->functionExpr); + } + else if (auto partiallyApplied = as<PartiallyAppliedGenericExpr>(expr)) + { + return GetBaseExpr(partiallyApplied->originalExpr); + } return nullptr; } diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp index 3867dda03..911587fd5 100644 --- a/source/slang/slang-check-overload.cpp +++ b/source/slang/slang-check-overload.cpp @@ -729,7 +729,7 @@ namespace Slang { auto expr = m_astBuilder->create<PartiallyAppliedGenericExpr>(); expr->loc = context.loc; - expr->originalExpr = originalAppExpr; + expr->originalExpr = baseExpr; expr->baseGenericDeclRef = as<DeclRefExpr>(baseExpr)->declRef.as<GenericDecl>(); expr->substWithKnownGenericArgs = (GenericSubstitution*)candidate.subst; return expr; |
