f1a2e41a8a
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.
50 lines
2.5 KiB
Plaintext
50 lines
2.5 KiB
Plaintext
tests/cases/compiler/constDeclarations-errors.ts(3,7): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(4,7): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(5,7): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(5,11): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(5,15): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(5,27): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(8,11): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(11,27): error TS2449: The operand of an increment or decrement operator cannot be a constant.
|
|
tests/cases/compiler/constDeclarations-errors.ts(14,11): error TS1155: 'const' declarations must be initialized
|
|
tests/cases/compiler/constDeclarations-errors.ts(17,20): error TS1155: 'const' declarations must be initialized
|
|
|
|
|
|
==== tests/cases/compiler/constDeclarations-errors.ts (10 errors) ====
|
|
|
|
// error, missing intialicer
|
|
const c1;
|
|
~~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
const c2: number;
|
|
~~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
const c3, c4, c5 :string, c6; // error, missing initialicer
|
|
~~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
~~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
~~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
~~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
|
|
// error, can not be unintalized
|
|
for(const c in {}) { }
|
|
~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
|
|
// error, assigning to a const
|
|
for(const c8 = 0; c8 < 1; c8++) { }
|
|
~~
|
|
!!! error TS2449: The operand of an increment or decrement operator cannot be a constant.
|
|
|
|
// error, can not be unintalized
|
|
for(const c9; c9 < 1;) { }
|
|
~~
|
|
!!! error TS1155: 'const' declarations must be initialized
|
|
|
|
// error, can not be unintalized
|
|
for(const c10 = 0, c11; c10 < 1;) { }
|
|
~~~
|
|
!!! error TS1155: 'const' declarations must be initialized |