aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/unchecked_fn_does_not_extend.zc
blob: e93a5826a6a27ad5da7d96527c9c67def42b7507 (plain) (blame)
1
2
3
4
5
6
// expect error: q: owned object is never used
// spec 4.9: only that function is unchecked
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
unchecked fn leaky() { int* p = rt.new(int); return 0; }
fn main() { int* q = rt.new(int); leaky(); return 0; }