Skip to content

[SR-10043] PrintAsObjC silently ignores explicit objc types nested in non-objc types #52446

@karwa

Description

@karwa
Previous ID SR-10043
Radar rdar://problem/30613254
Original Reporter @karwa
Type Bug
Environment

master on 3rd March 2019 (038a3a6)

macOS 10.14.2 (18C54)

Xcode 10.2 beta 3 (10P99q)

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

md5: 6168953bdc874889834cacb6566f309a

Issue Description:

Given the following code:

import Foundation

enum NonObjC {
  @objc public class ShouldBeExportableToObjC: NSObject {}
  @objc(MyCustomName) public class AlsoShouldBe: NSObject {}
}

Swift does not generate a header entry for either nested class (using `-emit-objc-header-path`). It also does not return any warning or error indicating that exporting failed.

The nesting only affects the Swift name, not whether or not the types are representable in ObjC. I think these should be supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PrintAsClangArea → compiler: The PrintAsClang librarybugA 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