blob: 5df5456b773eed9454d8a78c79e419102898aa81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// -*- rust -*-
type clam = rec(@int x, @int y);
type fish = tup(@int);
fn main() {
let clam a = rec(x=@1, y=@2);
let clam b = rec(x=@10, y=@20);
let int z = a.x + b.y;
log z;
assert (z == 21);
let fish forty = tup(@40);
let fish two = tup(@2);
let int answer = forty._0 + two._0;
log answer;
assert (answer == 42);
}
|