summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2023-11-06 21:42:38 +0100
committerGitHub <noreply@github.com>2023-11-06 21:42:38 +0100
commite550f0a8f726bf2696390e5f91df4c638888a990 (patch)
tree3c66ad971a984ac335e7f6e0f0f277f2558ead28 /tests/typ
parentc0f6d2004afebfa9412ba0c2d598ef8287197c42 (diff)
Prevent silent swallowing of return expressions trailing arguments (#2545)
Fixes #2104
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/compiler/return.typ7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/typ/compiler/return.typ b/tests/typ/compiler/return.typ
index 779a56dd..e709d6a7 100644
--- a/tests/typ/compiler/return.typ
+++ b/tests/typ/compiler/return.typ
@@ -80,3 +80,10 @@
]
#test(f(), "nope")
+
+---
+// Test rejection of extra value
+#let f() = [
+ // Error: 16-16 expected semicolon or line break
+ #return a + b Hello World
+]