abiType: support pointer
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/cl/internal/foo"
|
||||
)
|
||||
|
||||
func main() {
|
||||
bar := foo.Bar()
|
||||
if x, ok := bar.(struct{ V int }); ok {
|
||||
c.Printf(c.Str("%d\n"), x.V)
|
||||
println(x.V)
|
||||
} else {
|
||||
c.Printf(c.Str("Bar: not ok\n"))
|
||||
println("Bar: not ok")
|
||||
}
|
||||
if x, ok := foo.F().(struct{ v int }); ok {
|
||||
c.Printf(c.Str("%d\n"), x.v)
|
||||
println(x.v)
|
||||
} else {
|
||||
c.Printf(c.Str("F: not ok\n"))
|
||||
println("F: not ok")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user