1
0
forked from Mirror/wren
Files
wren/test/api/reset_stack_after_call_abort.wren
2016-11-01 08:40:16 -07:00

15 lines
427 B
Plaintext

// Regression test.
//
// If you invoked some code with wrenCall() and that code aborted the current
// fiber, it did not reset the API stack. If you tried to immediately reuse the
// API stack by calling wrenCall(), it would be in a broken state.
class Test {
static abortFiber() {
Fiber.abort("Abort!") // expect handled runtime error: Abort!
}
static afterAbort(a, b) {
System.print(a + b) // expect: 3
}
}