Post marked as solved
Post marked as solved with 2 replies, 306 views
Extend the example in “The Swift Programming Language” (Swift 5.5) “Integer and Floating-Point Conversion”:
3 + 0.14 // allowed
let three = 3
let rest = 0.14
3 + rest // allowed
0.14 + three // compile error
three + 0.14 // compile error
I don’t understand why the last two lines are taken as compile error. Can anyone help to explain a bit? Thanks.