summaryrefslogtreecommitdiff
path: root/tiger-compiler/tests/type/lower_than_nil.tig
blob: f53b0be5fd396a0c8be33faec7e26cd4ff88a33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let
  type rec = { key : string, value : int }
  var rec1 : rec := nil
  var rec2 : rec := nil
in
  if (rec1 < rec2) then
    print("lower");

  if (rec1 <= rec2) then
    print("lower or equal");

  if (rec1 = rec2) then
    print("equal");

  if (rec1 >= rec2) then
    print("higher or equal");

  if (rec1 > rec2) then
    print("higher")
end