runtime.Struct: temp disable abi.NewName

This commit is contained in:
xushiwei
2024-05-24 10:30:56 +08:00
parent 937e55eb46
commit 9b4701fed7
4 changed files with 15 additions and 13 deletions

View File

@@ -6,7 +6,8 @@ import (
)
func main() {
if x, ok := foo.Bar().(struct{ V int }); ok {
bar := foo.Bar()
if x, ok := bar.(struct{ V int }); ok {
c.Printf(c.Str("%d\n"), x.V)
} else {
c.Printf(c.Str("Bar: not ok\n"))