mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
In typecheck.go, detect binary methods so we know when to skip the receiver as first parameter when checking function signatures. The signature check is not yet performed, we just avoid a false error. In cfg.go, take care to label types with isBinMethod field to true whenever a binary method is resolved. Also, do not attempt to wrap node in functions if the node value is already a binary function. Fixes #1145.
15 lines
141 B
Go
15 lines
141 B
Go
package main
|
|
|
|
import "sync"
|
|
|
|
type F func()
|
|
|
|
func main() {
|
|
var wg sync.WaitGroup
|
|
var f F = wg.Done
|
|
println(f != nil)
|
|
}
|
|
|
|
// Output:
|
|
// true
|