mirror of https://github.com/tinygo-org/tinygo.git
wasmstm32webassemblymicrocontrollerarmavrspiwasiadafruitarduinocircuitplayground-expressgpioi2cllvmmicrobitnrf51nrf52nrf52840samd21tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
200 B
21 lines
200 B
3 years ago
|
package main
|
||
|
|
||
|
func external()
|
||
|
|
||
|
func deferSimple() {
|
||
|
defer func() {
|
||
|
print(3)
|
||
|
}()
|
||
|
external()
|
||
|
}
|
||
|
|
||
|
func deferMultiple() {
|
||
|
defer func() {
|
||
|
print(3)
|
||
|
}()
|
||
|
defer func() {
|
||
|
print(5)
|
||
|
}()
|
||
|
external()
|
||
|
}
|