selfhost: add @[Drop] attribute for user-defined structs

- ast.bux: add isDrop field to Decl
- parser.bux: parse @[Drop] attribute and attach to struct Decls
- hir_lower.bux: auto-drop now looks for TypeName_Drop for any type
- Test: _test_drop_user verifies Buffer_Drop is auto-called
This commit is contained in:
2026-06-10 13:32:40 +03:00
parent d6f0a30948
commit 0a41ce85f4
3 changed files with 17 additions and 2 deletions
+1
View File
@@ -274,6 +274,7 @@ struct Decl {
isPublic: bool,
isAsync: bool,
isChecked: int, // @[Checked] attribute (0/1)
isDrop: int, // @[Drop] attribute (0/1)
// Names
strValue: String, // decl name
strValue2: String, // interface name, dll name, module path