traefik / yaegi

Yaegi is Another Elegant Go Interpreter

Home Page:https://pkg.go.dev/github.com/traefik/yaegi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

conversion of untyped complex to complex64

mvertes opened this issue · comments

The following program sample.go triggers an unexpected result

package main

import "fmt"

func f() complex64 { return complex(0, 0) }

func main() {
	fmt.Println(f())
}

Expected result

$ go run ./sample.go
(0+0i)

Got

$ yaegi ./sample.go
run: /Users/marc/sample.go:5:29: cannot use  (type complex128T) as type complex64T in return argument

Yaegi Version

v0.12.0

Additional Notes

No response