2010-08-24 11:07:05 +02:00
|
|
|
(* Check manually *)
|
|
|
|
(* This test should only create two instances of f. *)
|
2010-08-18 10:13:26 +02:00
|
|
|
const c:int = 3
|
2010-08-24 11:07:05 +02:00
|
|
|
const k:int = 1
|
2010-08-18 10:13:26 +02:00
|
|
|
|
|
|
|
fun f<<n:int>>() returns (y:int)
|
|
|
|
let
|
2010-08-24 11:07:05 +02:00
|
|
|
y = n + 3 + c;
|
2010-08-18 10:13:26 +02:00
|
|
|
tel
|
|
|
|
|
|
|
|
fun g<<m:int>>() returns (y:int)
|
|
|
|
var x:int;
|
|
|
|
let
|
|
|
|
x = m + f<<2>>();
|
|
|
|
y = f<<m>>();
|
|
|
|
tel
|
|
|
|
|
2010-08-24 11:07:05 +02:00
|
|
|
fun i<<m:int>>() returns (o : int)
|
|
|
|
var x, y, z: int;
|
|
|
|
let
|
|
|
|
x = f<<2>>();
|
|
|
|
y = f<<1 + m>>();
|
|
|
|
z = f<<k + 1>>();
|
|
|
|
o = f<<m + k>>();
|
|
|
|
tel
|
|
|
|
|
2010-08-18 10:13:26 +02:00
|
|
|
fun h() returns (y:int)
|
|
|
|
let
|
2010-08-24 11:07:05 +02:00
|
|
|
y = c + g<<c>>() + i<<k>>();
|
2010-08-18 10:13:26 +02:00
|
|
|
tel
|
|
|
|
|