diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-06-27 12:05:36 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-06-27 12:05:36 +0200 |
| commit | f64c772b6d969fa3aa1a7391a3d8118b21430434 (patch) | |
| tree | 4829cea375ccb5c7dc864052fa80a63b9dcb6fb1 /tests | |
| parent | 422b8e640f00977177a5a7250a3c56009eed10c4 (diff) | |
Fix capturing bug
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/code/closure.typ | 10 |
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. { |
