-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself
Description
| Previous ID | SR-6811 |
| Radar | rdar://problem/50319752 |
| Original Reporter | marco (JIRA User) |
| Type | Bug |
Attachment: Download
Environment
Xcode Version 9.2 beta (9C34b)
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, ClangImporter |
| Assignee | None |
| Priority | Medium |
md5: ac75ea24f10428a371bce7f5da5a12b8
Issue Description:
If ProtocolA defines a property of type NSObject<ProtocolB>*, the Swift interface shows the property with type ProtocolB rather than NSObject & ProtocolB.
If the property is of type NSString<ProtocolB>*, the Swift interface loses the protocol information and just converts the property to type String.
What am I missing? It looks like the Swift conversion either loses the class or protocol information rather than keep them both with '&'.
I've attached an example project that shows the issue.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself