Swift: Unclear compiler error when in an #import is missing in a header which is included in the bridging header
| Originator: | dieter.komendera | ||
| Number: | rdar://19794377 | Date Originated: | 11-Feb-2015 10:39 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.2b1 (6D520o) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary:
I was missing an #import in an objc header file which subsequently is imported into the bridging header.
ProtocolTest/ProtocolTest/ProtocolTest-Bridging-Header.h:5:9: note: in file included from ProtocolTest-Bridging-Header.h:5:
#import "ItemProtocol.h"
^
ProtocolTest/ProtocolTest/ItemProtocol.h:14:4: error: expected a type
- (NSString *)key;
^
<unknown>:0: error: failed to import bridging header 'ProtocolTest/ProtocolTest/ProtocolTest-Bridging-Header.h'
Steps to Reproduce:
Try to compile attached sample project
Expected Results:
expected an error saying something like “unknown type NSString”
Actual Results:
got “error: expected a type”
Regression:
Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!