mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
interp: keep reverted package initializers in order
Previously, a package initializer that could not be reverted correctly would be called at runtime. But the initializer would be called in the wrong order: after later packages are initialized. This commit fixes this oversight and adds a test to verify the new behavior.
This commit is contained in:
committed by
Ron Evans
parent
8cc7c6d572
commit
607d824211
@@ -17,6 +17,7 @@ func TestInterp(t *testing.T) {
|
||||
"slice-copy",
|
||||
"consteval",
|
||||
"interface",
|
||||
"revert",
|
||||
} {
|
||||
name := name // make tc local to this closure
|
||||
t.Run(name, func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user