selfhost: add lib/Drop.bux with interface Drop; extend methods visible in scope
- lib/Drop.bux: interface Drop { func Drop(self: *Self); }
- sema.bux: define TypeName_MethodName in scope for impl block methods
so auto-drop (Lcx_BuildAutoDropFree) can find Drop implementations
via extend Type for Drop, not just @[Drop] or standalone functions
- Verified: extend Buffer for Drop auto-calls Buffer_Drop in @[Checked]
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// Drop trait — automatic cleanup for heap-allocated or resource-holding types
|
||||
interface Drop {
|
||||
func Drop(self: *Self);
|
||||
}
|
||||
Reference in New Issue
Block a user