cl/_testgo: defer6

This commit is contained in:
visualfc
2024-11-30 14:30:54 +08:00
parent 11f2ecd675
commit 6e8cecd13e
3 changed files with 45 additions and 22 deletions

15
cl/_testgo/defer6/in.go Normal file
View File

@@ -0,0 +1,15 @@
package main
func main() {
var a int = 5
defer println(a)
defer func() {
println(a)
}()
a = 10
panic("error")
//Output:
// 10
// 5
// panic: error
}

1
cl/_testgo/defer6/out.ll Normal file
View File

@@ -0,0 +1 @@
;