llgo/ssa: AfterInit/SliceLit/InterfaceData, unsafe.Slice; ssa/abi: Basic/Struct

This commit is contained in:
xushiwei
2024-05-22 10:07:21 +08:00
parent 556939139b
commit c19786bdfb
18 changed files with 361 additions and 202 deletions

View File

@@ -0,0 +1,18 @@
package main
import (
"github.com/goplus/llgo/_demo/interf/foo"
)
func main() {
if x, ok := foo.Bar().(struct{ V int }); ok {
println(x.V)
} else {
println("Bar: not ok")
}
if x, ok := foo.F().(struct{ v int }); ok {
println(x.v)
} else {
println("F: not ok")
}
}

View File