mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
6896b0014b
Previously using defer with an exported function generated an invalid function call due to differences between TinyGo's calling convention and the C calling convention.
17 lines
333 B
Plaintext
17 lines
333 B
Plaintext
hello from function pointer: 5
|
|
deferring...
|
|
Thing.Print: foo arg: bar
|
|
...run as defer 3
|
|
...run closure deferred: 4
|
|
...run as defer 1
|
|
...exported defer
|
|
loop 3
|
|
loop 2
|
|
loop 1
|
|
loop 0
|
|
bound method: foo
|
|
thing inside closure: foo
|
|
inside fp closure: foo 3
|
|
Thing.Print: arg: functional args 1
|
|
Thing.Print: named thing arg: functional args 2
|