Created
March 16, 2016 00:42
-
-
Save motokiee/c38511d27a0b41ae58ab to your computer and use it in GitHub Desktop.
なるほどSwift3以降もタプル自体は比較できないのか。あくまでもタプルの要素の比較なんだな。 #CodePiece
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75) | |
Target: x86_64-unknown-linux-gnu */ | |
let numbers1 = (1,1,1,1,1) | |
let numbers2 = (2,2,2,2,2) | |
let tuple1 = (numbers1, numbers2) | |
let tuple2 = (numbers1, numbers2) | |
print("bool: \(tuple1 == tuple2)") // error | |
let tuple3 = ((),()) | |
let tuple4 = ((),()) | |
print("bool: \(tuple3 == tuple4)") // error | |
print("bool: \(() == ())") // error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment