feat: complete M5 ownership and cleanup

This commit is contained in:
2026-08-16 18:48:35 +09:00
parent 351e5dbb23
commit deafd27939
13 changed files with 545 additions and 81 deletions
+13
View File
@@ -0,0 +1,13 @@
unit m5_bad_consuming_close;
struct FileLike {
handle: i32,
fn close(self: Self) -> !void { self.handle = 0; }
fn drop(self: &mut Self) { self.handle = 0; }
}
fn bad() -> !void {
let file: FileLike = FileLike{ handle: 7 };
try file.close();
file.close();
}