min/max functions are undefined
Author: lboyntonCreated Dec 19, 2024Updated May 4, 2026
Labelsbugarea/core
The following program sample.go triggers an unexpected result
package main
import "fmt"
func main() {
fmt.Println(max(1, 2))
}Expected result
$ go run ./sample.go
2Got
$ yaegi ./sample.go
run: sample.go:6:14: undefined: maxYaegi Version
v0.16.1
Additional Notes
These functions should be part of Go 1.21: https://go.dev/ref/spec#Min_and_max
Source: traefik/yaegi