mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
19 lines
414 B
Plaintext
19 lines
414 B
Plaintext
// Regression test.
|
|
//
|
|
// After a foreign constructor was called, 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.
|
|
foreign class ResetStackForeign {
|
|
construct new(a) {}
|
|
}
|
|
|
|
class Test {
|
|
static callConstruct() {
|
|
ResetStackForeign.new(1)
|
|
}
|
|
|
|
static afterConstruct(a, b) {
|
|
System.print(a + b) // expect: 3
|
|
}
|
|
}
|