2014-10-20 22:48:22 +02:00
|
|
|
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
|
2014-12-17 00:56:56 +01:00
|
|
|
tests/cases/compiler/constDeclarations-errors.ts(11,27): error TS2449: The operand of an increment or decrement operator cannot be a constant.
|
2014-10-20 22:48:22 +02:00
|
|
|
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
|
2014-10-13 06:10:04 +02:00
|
|
|
|
|
|
|
|
2014-10-15 02:37:46 +02:00
|
|
|
==== tests/cases/compiler/constDeclarations-errors.ts (10 errors) ====
|
2014-10-13 06:10:04 +02:00
|
|
|
|
|
|
|
// error, missing intialicer
|
|
|
|
const c1;
|
|
|
|
~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-13 06:10:04 +02:00
|
|
|
const c2: number;
|
|
|
|
~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-13 06:10:04 +02:00
|
|
|
const c3, c4, c5 :string, c6; // error, missing initialicer
|
|
|
|
~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-13 06:10:04 +02:00
|
|
|
~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-13 06:10:04 +02:00
|
|
|
~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-13 06:10:04 +02:00
|
|
|
~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-13 06:10:04 +02:00
|
|
|
|
2014-10-15 02:37:46 +02:00
|
|
|
// error, can not be unintalized
|
2014-10-13 06:10:04 +02:00
|
|
|
for(const c in {}) { }
|
|
|
|
~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-13 06:10:04 +02:00
|
|
|
|
2014-10-15 02:37:46 +02:00
|
|
|
// 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;) { }
|
|
|
|
~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|
2014-10-15 02:37:46 +02:00
|
|
|
|
|
|
|
// error, can not be unintalized
|
|
|
|
for(const c10 = 0, c11; c10 < 1;) { }
|
|
|
|
~~~
|
2014-10-20 22:48:22 +02:00
|
|
|
!!! error TS1155: 'const' declarations must be initialized
|