// expect: 1003 1003 0/ // spec 4.10.3: an o3 function called from normal code as a receiver method (run.method) enters the region like a direct call, so no collection runs inside it include rt; o3 int depth_of(int[?] v) { int i = 0, s = 0; while (i < len(v)) { s = s + v[i]; i++; } return rt.o3_depth * 1000 + s; } run.method("depth_of", depth_of); fn main() { int[?] v = rt.new(int[?]); v.push(1); v.push(2); rt.put_n(depth_of(v)); rt.put_c(32); rt.put_n(v.depth_of()); rt.put_c(32); rt.put_n(rt.o3_depth); rt.put_c(10); return 0; } // zc0: skip