aboutsummaryrefslogtreecommitdiff
path: root/tests/hold/reject/outside.zc
blob: a202898f3c12d64a745e3bc5b4e6439bf6483811 (plain) (blame)
1
2
3
4
5
// error: c: is shared in a hold block; only the functions written inside that block can use it
namespace;
include rt;
hold { shared let c; fn a() { c++; return c; } }
fn main() { c = 3; return a(); }