-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST] Paren'd reference to an IUO function crashes the compiler in SILGen #26831
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
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
32a0c8e
[AST] Strip off parens around an ApplyExpr's function
theblixguy f02a5f3
[Test] Add a test case
theblixguy ff7e8b1
[CSSimplify] If we're trying to assign the result of an IUO method wr…
theblixguy 4fd2a4c
[CS] Move the check to CSGen
theblixguy 76c29af
[Test] Adds a test case
theblixguy 0660764
[CS] Move the check to resolveOverload()
theblixguy b33c520
[CS] Extract the check into a separate lambda
theblixguy 6797148
[CS] Only check for the presence of a paren expr
theblixguy 32cfd5b
[CS] Only check if the decl has a function type
theblixguy 28d0c08
[CSApply] shouldForceUnwrapResult() should return false when we don't…
theblixguy a2daa11
Merge branch 'master' into fix/SR-10492
theblixguy 532498b
[CSApply] Use the choiceLocator, not locator when checking if a disju…
theblixguy b32386b
[CS] If locator points to a function call, then compare the fn and se…
theblixguy fc9fef2
[CS] Be more defensive in isIUOWrappedInParens() check
theblixguy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: not %target-swift-frontend -emit-silgen %s | ||
|
||
struct S { | ||
func foo() -> Int! { return 0 } | ||
} | ||
|
||
let s = S() | ||
let x: Int = (s.foo)() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.