abiType fix

This commit is contained in:
xushiwei
2024-05-25 08:20:09 +08:00
parent 1c8f860b6e
commit 5eac8d860a
6 changed files with 228 additions and 79 deletions

View File

@@ -1,5 +1,7 @@
package main
import "github.com/goplus/llgo/cl/internal/foo"
type bar struct {
pb *byte
f float32
@@ -10,7 +12,14 @@ func Foo(v any) (ret bar, ok bool) {
return
}
func Bar(v any) (ret foo.Foo, ok bool) {
ret, ok = v.(foo.Foo)
return
}
func main() {
ret, ok := Foo(nil)
println(ret.pb, ret.f, ok)
ret2, ok2 := Bar(foo.Foo{})
println(ret2.Pb(), ret2.F, ok2)
}