mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
At the call sites of `findAnonymousEnumForTypedef` we often wish to import the returned enum declaration and return the type the declaration creates. Prior to this patch, we assumed that the enum declaration would be imported as a `NominalTypeDecl`. This is not always the case. For whatever reason, sometimes in typechecking we import a declaration for various different naming versions. If the Swift name for an imported enum differs between the canonical name version, and currently requested name version, we import the enum as a `TypeAliasDecl` instead. Prior to this patch, this meant we would hit asserts importing some components of UIKit. This patch relaxes the assumption that the import is a `NominalTypeDecl` to just a `TypeDecl`, which as of yet, seems to be true.
23 lines
566 B
Plaintext
23 lines
566 B
Plaintext
Name: CenumsNSOptions
|
|
Enumerators:
|
|
- Name: API_NOTES_NAMED_OptionOne
|
|
SwiftName: SwiftOptionOneApiNotes
|
|
- Name: API_NOTES_NAMED_OptionTwo
|
|
SwiftName: SwiftOptionTwoApiNotes
|
|
- Name: API_NOTES_NAMED_OptionThree
|
|
SwiftName: SwiftOptionThreeApiNotes
|
|
- Name: API_NOTES_NAMED_OptionFour
|
|
SwiftName: SwiftOptionFourApiNotes
|
|
Tags:
|
|
- Name: UIPrinterJobTypes
|
|
SwiftName: UIPrinter.JobTypes
|
|
- Name: Baz
|
|
SwiftName: CurrentBazVersion
|
|
SwiftVersions:
|
|
- Version: 4
|
|
Tags:
|
|
- Name: UIPrinterJobTypes
|
|
SwiftName: UIPrinterJobTypes
|
|
- Name: Baz
|
|
SwiftName: BazVersion4
|