From abd56ef20bc8061bbecec29edd1301d324c2cb34 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 08:34:42 +0000 Subject: feat(classes): destroy stack objects at scope exit Co-Authored-By: Claude Opus 5.5 --- tests/i/class-delete/expected.txt | 12 ++++++++++++ tests/i/class-delete/notes.md | 2 ++ 2 files changed, 14 insertions(+) (limited to 'tests/i/class-delete') diff --git a/tests/i/class-delete/expected.txt b/tests/i/class-delete/expected.txt index 85c4753..c7e7246 100644 --- a/tests/i/class-delete/expected.txt +++ b/tests/i/class-delete/expected.txt @@ -8,3 +8,15 @@ double caught [Fatal] line 30: Invalid memory address (not an active allocation) stack caught leaf:2 +pair +leaf:2 +leaf:1 +pair +leaf:2 +leaf:1 +pair +leaf:2 +leaf:1 +pair +leaf:2 +leaf:1 diff --git a/tests/i/class-delete/notes.md b/tests/i/class-delete/notes.md index c4e2638..efe1e52 100644 --- a/tests/i/class-delete/notes.md +++ b/tests/i/class-delete/notes.md @@ -3,3 +3,5 @@ Human review: pending. Expected output was independently traced by AI. Explicit calls print only the outer method. Keyword DELETE prints outer, right, left. Invalid stack and stale heap addresses throw before any method runs. The array element uses an ordinary explicit method call. + +Normal main exit destroys Items[2], Items[1], Stack and the original Obj storage; each prints pair, leaf:2, leaf:1. -- cgit v1.3.1-4-g156e