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.
12 lines
220 B
Go
12 lines
220 B
Go
package main
|
|
|
|
func main() {
|
|
var c chan<- struct{} = make(chan struct{})
|
|
var d <-chan struct{} = c
|
|
|
|
_ = d
|
|
}
|
|
|
|
// Error:
|
|
// _test/assign15.go:5:26: cannot use type chan<- struct {} as type <-chan struct {} in assignment
|