llgo/ssa: deferInitBuilder

This commit is contained in:
xushiwei
2024-06-08 21:39:45 +08:00
parent 63c03bb28c
commit 29c0c737ed
5 changed files with 202 additions and 22 deletions

18
cl/_testgo/defer1/in.go Normal file
View File

@@ -0,0 +1,18 @@
package main
func f(s string) bool {
return len(s) > 2
}
func main() {
defer func() {
println("hi")
}()
if s := "hello"; f(s) {
defer println(s)
} else {
defer println("world")
return
}
defer println("bye")
}