liquidev/euwren

Tuples

liquidev opened this issue · 1 comments

euwren currently cannot wrap tuples. Tuples should automatically have a constructor, so that no extra wrappers are needed. Example:

tuple MyTuple = tuple[a, b, c: int]

wren.foreign("tuples"):
  MyTuple: discard
import "tuples" for MyTuple

var x = MyTuple.new(1, 2, 3)
System.print(x.a)
x.b = 10
System.print(x.b)
// etc

Fixed in 0.12.0.