erg/examples/unpack.er
2023-03-05 02:19:18 +09:00

5 lines
134 B
Python

UnpackPoint2D = Class {.x = Int; .y = Int}, Impl := Unpack
q = UnpackPoint2D::{.x = 1; .y = 2}
UnpackPoint2D::{x; y} = q
print! x, y