feat(drop): remove checkedFunc gate from auto-drop

This commit is contained in:
2026-06-11 01:08:57 +03:00
parent 2259567ac2
commit b549e09a3b
+2 -2
View File
@@ -1115,9 +1115,9 @@ func Lcx_LowerStmt(ctx: *LowerCtx, stmt: *Stmt) -> *HirNode {
storeNode.child1 = alloca; storeNode.child1 = alloca;
storeNode.child2 = init; storeNode.child2 = init;
// Auto-Drop for heap-allocated stdlib types in @[Checked] functions // Auto-Drop for @[Drop] types and heap-allocated stdlib types
var deferNode: *HirNode = null as *HirNode; var deferNode: *HirNode = null as *HirNode;
if ctx.checkedFunc && !String_Eq(alloca.typeName, "") { if !String_Eq(alloca.typeName, "") {
let typeName: String = alloca.typeName; let typeName: String = alloca.typeName;
let freeName: String = Lcx_BuildAutoDropFree(ctx, typeName); let freeName: String = Lcx_BuildAutoDropFree(ctx, typeName);
if !String_Eq(freeName, "") { if !String_Eq(freeName, "") {