aboutsummaryrefslogtreecommitdiff
path: root/tests/hold/reject/order.zc
blob: 9a2943be596144eb0419e54c431dcdd8f29ee44a (plain) (blame)
1
2
3
4
5
6
7
// trap: was entered while
// blocks are entered in declaration order; going back to an earlier block while a later one is held stops the program
namespace;
include rt;
hold { shared let a; fn ga() { a++; return a; } }
hold { shared let b; fn gb() { b++; return ga(); } }
fn main() { rt.put_n(gb()); rt.put_c(10); return 0; }