e0/examples/struct.e0

16 lines
192 B
Text

type IntPair = struct {
fst: int,
snd: int,
}
fn getX() -> IntPair {
return new IntPair {
fst: 4,
snd: 6,
};
}
fn main() -> int {
let x = getX();
return x.fst + x.snd;
}