Commits

Jordan Rose committed 3e846134e17
[ClangImporter] Don't mirror a protocol's methods if they're in the superclass. Right now we have a hack to mirror ObjC protocol methods into an imported ObjC class, because Swift's lookup only looks into superclasses, not into protocols (by default, anyway). This already isn't great because it's wrong for @optional, but it was particularly bad if /two/ superclasses conformed to the same protocol (directly or indirectly). Because the mirrored methods weren't marked as overrides, the type checker would consider them both as possibilities, leading to strange errors like this: <REPL Input>:1:1: error: ambiguous use of 'description' w.description() ^ AppKit.NSWindow:268:8: note: found this candidate func description() -> String ^ ObjectiveC.NSObject:72:8: note: found this candidate func description() -> String ^ Now, we check to see if a superclass conforms to a protocol already before mirroring its methods into the current class or category. <rdar://problem/16102321> and possibly also <rdar://problem/16038085> Swift SVN r14189