Skip to content
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

[SR-7264] Compile-time segmentation fault while referencing protocol method #49812

Closed
mpangburn opened this issue Mar 23, 2018 · 0 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@mpangburn
Copy link

Previous ID SR-7264
Radar None
Original Reporter @mpangburn
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: c50976600e08afb18a73fc376734d220

duplicates:

  • SR-75 Referencing a protocol function crashes the compiler

Issue Description:

Declaring a reference to a protocol method results in a compile-time segmentation fault while emitting SIL:

protocol ExampleProtocol {
    func example()
}
let example: (ExampleProtocol) -> () -> Void = ExampleProtocol.example

Declaring this reference explicitly, however, compiles and functions correctly:

let example: (ExampleProtocol) -> () -> Void = { example in { example.example() } }
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant