mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
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.
11 lines
144 B
Go
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
|