diff --git a/resources/examples/contextfree/cleanup.c3 b/resources/examples/contextfree/cleanup.c3 index 1d2b96618..64a978d70 100644 --- a/resources/examples/contextfree/cleanup.c3 +++ b/resources/examples/contextfree/cleanup.c3 @@ -22,7 +22,8 @@ fn void Resource.deinit(Resource this) => io::printfn("close %s", this.name); macro void! @open_with(String name; @body(Resource resource)) { Resource resource = resource_init(name)!; - defer { + defer + { io::printn("Using open_with to close"); resource.deinit(); } @@ -46,7 +47,7 @@ fn Resource! prep_out(String out_name, String[] prep_names) fn void main() { - Resource writer = prep_out("out", String[] { "a", "b"}); + Resource writer = prep_out("out", String[] { "a", "b"})!!; defer writer.deinit(); io::printn("use out"); } \ No newline at end of file