summaryrefslogtreecommitdiff
path: root/tiger-compiler/tests/good/fun-vs-var.tig
blob: 66d18725f83ad25f39cfdd0516a17db26d3979b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*-------------------------------------------------------------------.
| Types, variables and functions do not share the same environment.  |
| In addition, there can be different nesting levels.  Below there   |
| are four different `a's.                                           |
`-------------------------------------------------------------------*/

let
   type a = int
   var a : a := 2
   function a(a : a) : a = a
in
   a(a + a)
end