2010-12-14 18:36:54 +01:00
|
|
|
(* Check manually *)
|
|
|
|
(* This test should only create two instances of f. *)
|
|
|
|
const c2:int = 3
|
|
|
|
const k2:int = 1
|
|
|
|
|
|
|
|
fun f<<n:int>>() returns (y:int)
|
|
|
|
let
|
|
|
|
y = n + 3 + c2;
|
|
|
|
tel
|
|
|
|
|
|
|
|
fun g<<m:int>>() returns (y:int)
|
|
|
|
var x:int;
|
|
|
|
let
|
|
|
|
x = m + f<<2>>();
|
|
|
|
y = f<<m>>();
|
|
|
|
tel
|
|
|
|
|
|
|
|
fun i<<m:int>>() returns (o : int)
|
|
|
|
var x, y, z: int;
|
|
|
|
let
|
|
|
|
x = f<<2>>();
|
|
|
|
y = f<<1 + m>>();
|
|
|
|
z = f<<k2 + 1>>();
|
|
|
|
o = f<<m + k2>>();
|
|
|
|
tel
|
|
|
|
|
2011-02-07 14:24:17 +01:00
|
|
|
fun h() returns (y,y2:int)
|
2010-12-14 18:36:54 +01:00
|
|
|
let
|
|
|
|
y = c2 + g<<c2>>() + i<<k2>>();
|
2011-02-07 14:24:17 +01:00
|
|
|
y2 = c2 + Statics.g<<k2>>() + Statics.i<<k2>>();
|
2010-12-14 18:36:54 +01:00
|
|
|
tel
|
|
|
|
|