suicmez/tests/structs.sui
2025-12-17 13:18:12 +05:30

17 lines
255 B
Text

# Struct test
struct Point
x: int,
y: int,
end
struct Person
name: string,
age: int,
end
fn main() -> int do
let p = Point { x: 5, y: 10 };
let person = Person { name: "Alice", age: 30 };
let _ = p.x + person.age;
0
end