diff options
Diffstat (limited to 'tests/conformance/4-statements/unchecked_toplevel_rest_of_unit.zc')
| -rw-r--r-- | tests/conformance/4-statements/unchecked_toplevel_rest_of_unit.zc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/conformance/4-statements/unchecked_toplevel_rest_of_unit.zc b/tests/conformance/4-statements/unchecked_toplevel_rest_of_unit.zc new file mode 100644 index 0000000..7d70eff --- /dev/null +++ b/tests/conformance/4-statements/unchecked_toplevel_rest_of_unit.zc @@ -0,0 +1,11 @@ +// expect: 1/ +// spec 4.9: unchecked; at top level switches the analyzer off for the rest of the unit +include rt; +void pn(int x) { rt.put_n(x); rt.put_c(10); } +unchecked; +fn main() { + int* p = rt.new(int); + pn(1); + return 0; +} +// zc0: skip |
