This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
13 lines
No EOL
629 B
Text
13 lines
No EOL
629 B
Text
tests/cases/conformance/parser/ecmascript5/parserNotRegex1.ts(1,7): error TS2304: Cannot find name 'a'.
|
|
tests/cases/conformance/parser/ecmascript5/parserNotRegex1.ts(3,5): error TS1108: A 'return' statement can only be used within a function body.
|
|
|
|
|
|
==== tests/cases/conformance/parser/ecmascript5/parserNotRegex1.ts (2 errors) ====
|
|
if (a.indexOf(-(4/3))) // We should not get a regex here becuase of the / in the comment.
|
|
~
|
|
!!! error TS2304: Cannot find name 'a'.
|
|
{
|
|
return true;
|
|
~~~~~~
|
|
!!! error TS1108: A 'return' statement can only be used within a function body.
|
|
} |