Skip to content

[SR-1013] Swift 2.2 compiler segfault w/ bridging Obj-C protocol #43625

@swift-ci

Description

@swift-ci
Previous ID SR-1013
Radar None
Original Reporter colincornaby (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Swift 2.2, Xcode 7.3 final

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

md5: ed0b57a52f1af55bb8d1d96fd066031c

duplicates:

  • SR-872 C functions in Obj-C interfaces are not imported into Swift

Issue Description:

We have a public SDK that is causing the Swift 2.2 compiler to segfault. I've boiled the problem down to a sample project, and the problem seems to be related to an NS_ENUM within the protocol. When I move the NS_ENUM definition out of the protocol definition the project compiles ok.

I inherited this code so I'm not sure why the NS_ENUM was declared inside of the protocol definition, but this worked under Swift 2.1, so I'll file it as a bug, as I think this header should probably bridge ok to Swift anyway. On our end I can move the enum out of the protocol, and then update.

Attaching a sample.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions