The previous type checking was off and did not do untyped type conversion. This endeavours to fix this with better type checking in its own type.
11 lines
138 B
Go
11 lines
138 B
Go
package main
|
|
|
|
func main() {
|
|
var a int = 3
|
|
a += 1.3
|
|
println(a)
|
|
}
|
|
|
|
// Error:
|
|
// 5:2: invalid operation: mismatched types int and float64
|