From f64c772b6d969fa3aa1a7391a3d8118b21430434 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 27 Jun 2021 12:05:36 +0200 Subject: Fix capturing bug --- tests/typ/code/closure.typ | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/typ/code/closure.typ') 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. { -- cgit v1.2.3