2 ms·
Try to add an int and a float32 using 'Try go' on http://glolang.org http://glolang.org - I get this error: prog.go:13: invalid operation: x + y (mismatched ty
by jondubois 12y ago
Try to add an int and a float32 using 'Try go' on http://glolang.org http://glolang.org - I get this error:
prog.go:13: invalid operation: x + y (mismatched types int and float32)
[process exited with non-zero status]
I'd have to cast one of the variables to get it to work. Casting is unnatural - Maybe it's not so bad in this case, but in many cases it isn't desirable.