wren_rust 0.1.3

Bindings to the Wren scripting language API
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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
  }
}