aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 16:14:01 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 16:14:01 +0330
commit45b53ef93135b240989d88b065f7ee7f12a95bfb (patch)
tree275f39cfa2f7b4d424f6f0a87fa7fbcae3c1e53d /tests
parentzc0: string literals have no length limit (the token text grows) (diff)
zc0: reject .u on a typed parameter with the compiler's message
Diffstat (limited to 'tests')
-rw-r--r--tests/conformance/5-declarations/fn_param_tag_u_rejected.zc6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/conformance/5-declarations/fn_param_tag_u_rejected.zc b/tests/conformance/5-declarations/fn_param_tag_u_rejected.zc
new file mode 100644
index 0000000..858e142
--- /dev/null
+++ b/tests/conformance/5-declarations/fn_param_tag_u_rejected.zc
@@ -0,0 +1,6 @@
+// expect error: a parameter tag is .m or .d
+// spec: .u tags a return, never a parameter (zc0 used to accept int.u x silently)
+include rt;
+int f(int* .u x) { return 0; }
+fn main() { return f(0); }
+// zc0: error