Skip to content

[CS] Don't simplify FunctionResult in simplifyLocator #78377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

hamishknight
Copy link
Contributor

@hamishknight hamishknight commented Dec 28, 2024

Simplifying into the function expression is wrong, like FunctionArgument this isn't an element that can be simplified. Seems like this was a leftover from #31679 before it introduced the UnresolvedMemberChainResult locator element.

While here, remove the unused AutoClosureForwarding fix.

Resolves #78376

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

Allow `InsertExplicitCall` for e.g converting
`() -> () -> Void` to `() -> Void`. No test since
it's already covered in the test suite when the
next commit is applied.
Simplifying into the function expression is wrong,
like `FunctionArgument` this isn't an element that
can be simplified. This also means we don't need
to handle it in `MissingCallFailure`, since we
shouldn't be recording that fix in this case.
The fix is currently unused, and the
FailureDiagnostic can be inlined into
MissingCallFailure.
@hamishknight hamishknight marked this pull request as ready for review December 30, 2024 16:28
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 4cbe481 into swiftlang:main Jan 2, 2025
5 checks passed
@hamishknight hamishknight deleted the no-simplify-result branch January 2, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler crashes attempting to convert () -> Double to () -> CGFloat
2 participants