mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
wasm: support //go:wasmexport functions after a call to time.Sleep
This fixes a bug where `//go:wasmexport` functions would not be allowed anymore after a call to `time.Sleep` (when using `-buildmode=default`).
This commit is contained in:
Vendored
+6
@@ -1,5 +1,7 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
func init() {
|
||||
println("called init")
|
||||
}
|
||||
@@ -8,6 +10,10 @@ func init() {
|
||||
func callTestMain()
|
||||
|
||||
func main() {
|
||||
// Check that exported functions can still be called after calling
|
||||
// time.Sleep.
|
||||
time.Sleep(time.Millisecond)
|
||||
|
||||
// main.main is not used when using -buildmode=c-shared.
|
||||
callTestMain()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user