blob: b865f982d1991419a395bcf6104590d784cdde8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
program()
type
E1 = (one, two, three, four)
E2 = (zero = 0, one, two, three)
E3 = (minus = -5, two = 2, ten = 10)
begin
assert(cast(E1.one: Int) = 1);
assert(cast(E1.two: Int) = 2);
assert(cast(E1.four: Int) = 4);
assert(cast(E2.zero: Int) = 0);
assert(cast(E2.one: Int) = 1);
assert(cast(E2.three: Int) = 3);
assert(cast(E3.minus: Int) = -5);
assert(cast(E3.two: Int) = 2);
assert(cast(E3.ten: Int) = 10)
end.
|