Microsoft/TypeScript — pull request #748 by chrisbubernak (2014-09-25 16:14:49+00:00)
Title: Fix issue #568 (no error for file self reference)

Fix issue [#568](https://github.com/Microsoft/TypeScript/issues/568) where no error is being displayed when a file tries to reference itself.

The compiler now shows the error message "A file cannot have a reference to itself." when a file tries to reference itself. I've included 3 unit tests for this fix. The first has a file that tries to reference itself and should fail with this error. The second tries to reference a file of the same name but a different base path and, while it won't fail with the same file reference error, it should fail with a file not found error. The third test is a permutation of the first and references the same file but with "./" appended to the front, after normalizing the file paths this should fail as it is a reference to the same file.