aboutsummaryrefslogtreecommitdiff
path: root/tests/iii/extern-struct-rejected/program.cps
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 13:56:44 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 13:56:44 +0000
commit312a19c781da1c31ff1e3dc71c319663a8be9148 (patch)
tree80d63213c0d11b1fcf3d67ef6e51289fe4b5096e /tests/iii/extern-struct-rejected/program.cps
parent5eccd90b47b327917ad0e5858c79ca8fab27cd74 (diff)
feat(codegen): accept pointer types to any C type in EXTERN
A pseudocode pointer type now counts as a C type, in EXTERN signatures and as a C-struct field, when it finally points to a non-void C type or a C struct, as in TYPE PInt = ^C_INT. A pointer cycle such as TYPE P = ^P and a pointer to a pseudocode type stay rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/iii/extern-struct-rejected/program.cps')
-rw-r--r--tests/iii/extern-struct-rejected/program.cps2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/iii/extern-struct-rejected/program.cps b/tests/iii/extern-struct-rejected/program.cps
index ced6fee..80f965f 100644
--- a/tests/iii/extern-struct-rejected/program.cps
+++ b/tests/iii/extern-struct-rejected/program.cps
@@ -11,3 +11,5 @@ EXTERN "C" EXTERN_FUNCTION atoi(C_STRING) RETURNS Person
EXTERN "C" EXTERN_FUNCTION printf(C_STRING, ...) RETURNS C_INT
DECLARE Someone : Person
OUTPUT printf((C_STRING)"%d", Someone)
+TYPE PInteger = ^INTEGER
+EXTERN "C" EXTERN_PROCEDURE srand(PInteger)