diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 06:50:29 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 06:50:29 +0000 |
| commit | c89477d615fb0ce4d89786ef848ffe6aca1da088 (patch) | |
| tree | b2c5692cfa4946fcd1df034630fc1a678d922b9c /tests/i/class-new-methods/program.cps | |
| parent | 43451328a5ae74ffa34356259ee02e3786f070c3 (diff) | |
feat(classes): support explicit NEW constructor method calls
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/i/class-new-methods/program.cps')
| -rw-r--r-- | tests/i/class-new-methods/program.cps | 16 |
1 files changed, 16 insertions, 0 deletions
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 |
