summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-07-06 15:14:14 +0200
committerLaurenz <laurmaedje@gmail.com>2023-07-06 15:16:41 +0200
commitadcc6e5506eb1888c8eaeea167f0058d70220cab (patch)
tree6da5476f83b48edf9abb03d4cfb8a43224ed2e59 /tests/typ
parent46a6f92bf341268a1369a6034f1bc32408aedd9e (diff)
Better error messages for keywords in place of identifiers
Fixes #1123
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/compiler/embedded-expr.typ12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/typ/compiler/embedded-expr.typ b/tests/typ/compiler/embedded-expr.typ
new file mode 100644
index 00000000..ab426f6a
--- /dev/null
+++ b/tests/typ/compiler/embedded-expr.typ
@@ -0,0 +1,12 @@
+// Test embedded expressions.
+// Ref: false
+
+---
+// Error: 6-8 expected identifier, found keyword `as`
+#let as = 1 + 2
+
+---
+#{
+ // Error: 7-9 expected identifier, found keyword `as`
+ let as = 10
+}