Microsoft/TypeScript — pull request #1287 by vladima (2014-11-27 00:04:10+00:00)
Title: Simple control flow analysis 

This PR adds a basic control flow analysis to typescript compiler. Now it can detect unreachable code, implicit returns of undefined in functions, unused labels, fall- through between cases in switch statements. Some of these checks can be used in #393 or #274.

![cfa](https://cloud.githubusercontent.com/assets/8052307/5210657/c5ae0f28-7585-11e4-97d8-86169ef2a160.gif)

Disclaimer: This PR is not intended to be checked in as-is. What I rather want is to use it as a starting point to discuss:
- difference between warnings and errors. now all semantic errors that are produced by the compler can be treated as warnings - they do not block emit. However visually they are always presented as errors which might be confusing, I.e. I would expect message about unreachable code to be more like recommendation (presented using green squigglies or shadowed code) instead of being aggressively marked as error
- error suppression story - global and local