Every variable in swift has a type.
var c: Int = 0 // type is Int
var d: (Int,(String,Double)) // type is (Int,(String,Double))
how can I get type of a variable. See example below.
func retSomeThing ()-> ((Int,(String,b: Int))){
return(10,("something",b: 56))
}
var a = retSomeThing()
var b = retSomeThing()
if (a.type.equal(b.type)) { // my problem is here.
print("Hala Madrid")
}
I used this code
a.dynamicType
But it has shown : value of tuple type '(Int, (String, b: Int))' has no member 'dynamicType'