summaryrefslogtreecommitdiff
path: root/test/diagnostics/redefined-local.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/diagnostics/redefined-local.lua')
-rw-r--r--test/diagnostics/redefined-local.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/diagnostics/redefined-local.lua b/test/diagnostics/redefined-local.lua
new file mode 100644
index 00000000..c594ed2c
--- /dev/null
+++ b/test/diagnostics/redefined-local.lua
@@ -0,0 +1,22 @@
+TEST [[
+local x
+print(x)
+local <!x!>
+print(x)
+]]
+
+TEST [[
+local x
+print(x)
+local <!x!>
+print(x)
+local <!x!>
+print(x)
+]]
+
+TEST [[
+local x
+return x, function (<!x!>)
+ return x
+end
+]]