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-14535] Using ObjC Protocol type crashes the compiler when emitting swiftinterface #56887

Closed
kabiroberai opened this issue Apr 27, 2021 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@kabiroberai
Copy link
Contributor

Previous ID SR-14535
Radar rdar://problem/77224219
Original Reporter @kabiroberai
Type Bug
Status Resolved
Resolution Cannot Reproduce

Attachment: Download

Environment

macOS 11.2.3 (20D91), Xcode 12.5 (12E262), Swift 5.4. Tested against the macOS and iOS SDKs.

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 30a944d33c97dc065fe3bd3855122b39

Issue Description:

When building a framework with library evolution (edit: or even without evolution, so long as a module interface is emitted), publicly visible declarations involving the Objective-C Protocol class crash the compiler. For example:

public func foo(_: Protocol) {}

This appears to be a regression in Swift 5.4. I couldn't reproduce the crash as of Swift Development Snapshot 2021-04-18 (a), however I'm not sure whether that's because the regression has been patched or whether it was introduced in a commit that the snapshot doesn't contain.

I've attached a sample Xcode project demonstrating the issue, as well as a backtrace.

@typesanitizer
Copy link

@swift-ci create

@typesanitizer
Copy link

Yeah, this seems to be fixed on main. Marking this as resolved.

The snapshot should contain all the commits present in Swift 5.4; additional changes are first made on main and cherry-picked onto 5.4 (after the branch is cut) if needed.

@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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants