blob: 7dfe6f09ae473953d3b3a92438c92a73bd2a793c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// expect: 902
namespace;
include rt;
hold {
shared let c = 5;
shared int[3] hist;
fn bump(int k) { c = c + k; hist[0]++; return c; }
fn twice(int k) { bump(k); return bump(k); }
fn get() { return c * 100 + hist[0]; }
}
fn main() {
twice(2);
rt.put_n(get()); rt.put_c(10);
return 0;
}
|