Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/IDE/ArgumentCompletion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ tryResolveDoubleAppliedFunction(CallExpr *OuterCall, const Solution &S) {
if (!FuncRefInfo.isDoubleApply())
return std::nullopt;

auto CalleeTy = Overload->adjustedOpenedType->getAs<AnyFunctionType>();
auto ResultTy = S.simplifyTypeForCodeCompletion(CalleeTy->getResult());
auto CalleeTy = S.simplifyTypeForCodeCompletion(Overload->adjustedOpenedType)
->getAs<AnyFunctionType>();
if (!CalleeTy)
return std::nullopt;

auto *FuncTy = ResultTy->getAs<AnyFunctionType>();
auto *FuncTy = CalleeTy->getResult()->getAs<AnyFunctionType>();
if (!FuncTy)
return std::nullopt;

Expand Down
7 changes: 7 additions & 0 deletions validation-test/IDE/crashers_fixed/934bb97a5cbe0b8.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// {"kind":"complete","original":"a705fa0d","signature":"swift::constraints::Solution::simplifyType(swift::Type, bool) const","signatureAssert":"Assertion failed: (!resolvedType->getRecursiveProperties().isSolverAllocated()), function simplifyType"}
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
{
$1 {
}(
#^^#)
}