aboutsummaryrefslogtreecommitdiff
path: root/tests/iii/implicit-string-opt-in/program.cps
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-30 14:31:07 +0000
committer_ov4 <ov4@ov4.org>2026-10-30 14:31:07 +0000
commit0cf54b4f77ccf8376341950b02ceb7c1d1268ed7 (patch)
treeeebbba01063451c28f0a2e1cc048215f50beb98f /tests/iii/implicit-string-opt-in/program.cps
parent4cb0d9b196008bc55dbfcdac1f9211dbbc879895 (diff)
refactor(strings): construct string values implicitly from raw literals
Keep double-quoted literals and text constants as C_STRING values. Use marked STRING constructors for text and CHAR conversion, preserving string operations and I/O through the existing class machinery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/iii/implicit-string-opt-in/program.cps')
-rw-r--r--tests/iii/implicit-string-opt-in/program.cps14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/iii/implicit-string-opt-in/program.cps b/tests/iii/implicit-string-opt-in/program.cps
new file mode 100644
index 0000000..b5afccc
--- /dev/null
+++ b/tests/iii/implicit-string-opt-in/program.cps
@@ -0,0 +1,14 @@
+CLASS STRING
+ Text : C_STRING
+ PROCEDURE NEW(Value : C_STRING)
+ Text <- Value
+ ENDPROCEDURE
+ FUNCTION C_STR() RETURNS C_STRING
+ RETURN Text
+ ENDFUNCTION
+ENDCLASS
+DECLARE Explicit : STRING("explicit")
+OUTPUT Explicit
+DECLARE Text : STRING
+Text <- "requires opt-in"
+OUTPUT "requires opt-in"