import Cocoa
let constB:Float = 3.14159
let constc:Int = 3.14159// double is not allowed here
println(constB)
println(constc)
produces following error
main.swift:6:18: error: 'Double' is not convertible to 'Int' let constc:Int = 3.14159
No comments:
Post a Comment