From 42ad4ed70a2012f545dcbd15f037069c31894f5c Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Wed, 6 Dec 2017 21:38:07 +0100 Subject: [PATCH] Add more block scope tests --- test/rules/usage/var.ts.lint | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/test/rules/usage/var.ts.lint b/test/rules/usage/var.ts.lint index e3c82ec..322b054 100644 --- a/test/rules/usage/var.ts.lint +++ b/test/rules/usage/var.ts.lint @@ -74,7 +74,7 @@ setTimeout(); { let i; - for (i = 0; i < 10: ++i) { + for (i = 0; i < 10; ++i) { let i; ~ [Unused] } @@ -82,7 +82,7 @@ setTimeout(); { let i; ~ [Unused] - for (let i = 0; i < 10: ++i) { + for (let i = 0; i < 10; ++i) { let i; ~ [Unused] } @@ -96,3 +96,14 @@ setTimeout(); } i = 1; } +{ + let i; + ~ [Unused] + for (let i = 0;false;) + ++i; +} +{ + let i; + for (;false;) + ++i; +}