summaryrefslogtreecommitdiff
path: root/tests/typ/code
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/code')
-rw-r--r--tests/typ/code/closure.typ10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/typ/code/closure.typ b/tests/typ/code/closure.typ
index 86a6f632..402df799 100644
--- a/tests/typ/code/closure.typ
+++ b/tests/typ/code/closure.typ
@@ -44,6 +44,16 @@
test(func(), error)
}
+// Redefined variable.
+{
+ let x = 1
+ let f() = {
+ let x = x + 2
+ x
+ }
+ test(f(), 3)
+}
+
---
// Too few arguments.
{