From b628e3bae0605071216d603c85401136d6d4260b Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Tue, 14 Jul 2015 09:48:22 -0700 Subject: [PATCH] don't put unreachable warning on comments --- ast/typeChecker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ast/typeChecker.ts b/ast/typeChecker.ts index 1a2de633..3c1d167c 100644 --- a/ast/typeChecker.ts +++ b/ast/typeChecker.ts @@ -729,7 +729,7 @@ module TDev.AST this.typeCheck(ss[i]) if (unreach) { ss[i].isUnreachable = true - if (!reported) { + if (!reported && !(ss[i] instanceof Comment)) { reported = true ss[i].addHint(lf("code after return, break or continue won't ever run")) }