Avatar
omochimetaru 11/9/2018 3:30 AM
ちょうどたどり着きつつ会った
3:33 AM
起点となるのは、AnyHashable.init冒頭の (base as? _HasCustomAnyHashableRepresentation)?._toCustomAnyHashable() ですね
3:33 AM
これでAnyHashableの中で捕まえておくboxを型固有のboxにできる穴が空いている
3:35 AM
let a = (42 as Int as AnyHashable) let b = (42 as NSNumber as AnyHashable) let c = (42 as Double as AnyHashable) a == b // true b == c // true a == c // was false(!), now true
3:35 AM
AnyHashable経由だと Int(42) == Double(42) なの・・・?