From c89477d615fb0ce4d89786ef848ffe6aca1da088 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 06:50:29 +0000 Subject: feat(classes): support explicit NEW constructor method calls Co-Authored-By: Claude Opus 5.5 --- tests/i/class-new-methods/program.cps | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/i/class-new-methods/program.cps (limited to 'tests/i/class-new-methods/program.cps') diff --git a/tests/i/class-new-methods/program.cps b/tests/i/class-new-methods/program.cps new file mode 100644 index 0000000..573fe0f --- /dev/null +++ b/tests/i/class-new-methods/program.cps @@ -0,0 +1,16 @@ +CLASS Box + Value : STRING + PROCEDURE NEW(Text : STRING) + Value <- Text + ENDPROCEDURE + PROCEDURE Reset() + this.NEW("again") + ENDPROCEDURE +ENDCLASS +DECLARE Obj : Box +Obj.NEW("x") +OUTPUT Obj.Value +CALL Obj.new("call") +OUTPUT Obj.Value +Obj.Reset() +OUTPUT Obj.Value -- cgit v1.3.1-4-g156e