blob: 956a7eb440b55cb07fb1025795691cf400f660b7 (
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;
check (z == 21);
let fish forty = tup(@40);
let fish two = tup(@2);
let int answer = forty._0 + two._0;
log answer;
check (answer == 42);
}
|