Open section1Q84 opened 6 months ago
sample.go
package main import ( "github.com/traefik/yaegi/stdlib" "github.com/traefik/yaegi/stdlib/unsafe" ) var payload = ` package main func main() { StringToBytes("a") } func StringToBytes(s string) []byte { return unsafe.Slice(unsafe.StringData(s), len(s)) } ` func main() { i := interp.New(interp.Options{}) i.Use(stdlib.Symbols) i.Use(unsafe.Symbols) }
normal
package unsafe \"unsafe\" has no symbol Slice"
latest
No response
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
latest
Additional Notes
No response