Files
Nicholas WiersmaandGitHub a79801d7dc interp: build type strings on the fly
This adds `itype.str` which is a string representation of the type built when the type is built. The goal is to make type comparison simpler and centralise the creation of types just to constructors and `nodeType`. `nodeType` continues to build types in parts so to reuse underlying types better.
2021-08-27 19:44:05 +02:00

11 lines
144 B
Go

package main
func main() {
var a int = 3
a += 1.3
println(a)
}
// Error:
// 5:2: invalid operation: mismatched types int and untyped float