Skip to content

Instantly share code, notes, and snippets.

@hiroshi-maybe
Last active March 25, 2016 08:08
Show Gist options
  • Select an option

  • Save hiroshi-maybe/169e6b4166723532b172 to your computer and use it in GitHub Desktop.

Select an option

Save hiroshi-maybe/169e6b4166723532b172 to your computer and use it in GitHub Desktop.
Swift compiler crash in Xcode 7.1
// 1. same name of functions with different signature in both protocol and protocol extension
// 2. someone is conforming to the protocol
// This should be compile error though, error does not happen. Instead Compiler crashes in AST -> SIL conversion phase.
protocol FooProtocol {
func sameName(differentSignature: Bool) -> UITableViewCell?
}
extension FooProtocol {
func sameName() -> UITableViewCell {
return UITableViewCell()
}
}
// someone needs to conform to the protocol
class Foo: FooProtocol {}
@hiroshi-maybe
Copy link
Copy Markdown
Author

Already fixed in Xcode 7.3
screen shot 2016-03-25 at 01 07 38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment