cl/_testgo: defer6
This commit is contained in:
15
cl/_testgo/defer6/in.go
Normal file
15
cl/_testgo/defer6/in.go
Normal 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
1
cl/_testgo/defer6/out.ll
Normal file
@@ -0,0 +1 @@
|
||||
;
|
||||
Reference in New Issue
Block a user