build: separate compiler and libs

This commit is contained in:
Li Jie
2025-01-07 21:49:08 +08:00
parent b0123567cd
commit 1172e5bdce
559 changed files with 190 additions and 176 deletions

View File

@@ -0,0 +1,26 @@
package main
import "github.com/goplus/llgo/compiler/cl/internal/foo"
type bar struct {
pb *byte
f float32
}
func Foo(v any) (ret bar, ok bool) {
ret, ok = v.(bar)
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, "notOk:", !ok)
ret2, ok2 := Bar(foo.Foo{})
println(ret2.Pb(), ret2.F, ok2)
}