Using Swift 3 and am having problems comparing an Int32 and Int in an IF statement.
// myIntFromCoreData is an Int32
// kMyConstant is an Int
if myIntFromCoreData == kMyConstant // error: Binary operator "==" cannot be applied to operands of type 'Int32' and 'Int'
{
Log("Cool")
}
So, I tried casting the values to Int32 or Int using:
myint32.intValue // Value of type 'Int32' has no member 'intValue'
myint32 as Int // Cannot convert value of type 'Int32' to type 'Int' in coercion
kMyConstant as Int32 // Cannot convert value of type 'Int' to type 'Int32' in coercion
But kept getting the above errors. Can anybody provide some direction no how to handle this?