Skip to content

Instantly share code, notes, and snippets.

@hiragram
Created April 13, 2017 08:12
Show Gist options
  • Select an option

  • Save hiragram/c6acdd9b6abe857110c843f0e2908496 to your computer and use it in GitHub Desktop.

Select an option

Save hiragram/c6acdd9b6abe857110c843f0e2908496 to your computer and use it in GitHub Desktop.
extension Array {
var hoge: String {
return ""
}
}
extension Array where Element: Integer {
var hoge: Int {
return 1
}
}
let array = [1,2,3,4,5]
array.hoge // Ambiguous use of 'hoge'
@hiragram
Copy link
Author

Xcode8.2から8.3にアップデートしたらこんなコードが以前コンパイル通ってたのが通らなくなった

@hiragram
Copy link
Author

なんでこんなクソextensionあるのという話はおいておいて、3.1でのどの変更がこの結果を生んでるのかが気になる

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