TypeScript/tests/baselines/reference/constDeclarations-errors.errors.txt

46 lines
2.2 KiB
Plaintext
Raw Normal View History

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
2015-02-27 01:53:25 +01:00
tests/cases/compiler/constDeclarations-errors.ts(10,27): error TS2449: The operand of an increment or decrement operator cannot be a constant.
tests/cases/compiler/constDeclarations-errors.ts(13,11): error TS1155: 'const' declarations must be initialized
tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' declarations must be initialized
2015-02-27 01:53:25 +01:00
==== tests/cases/compiler/constDeclarations-errors.ts (9 errors) ====
// error, missing intialicer
const c1;
~~
2014-10-20 22:48:22 +02:00
!!! error TS1155: 'const' declarations must be initialized
const c2: number;
~~
2014-10-20 22:48:22 +02:00
!!! error TS1155: 'const' declarations must be initialized
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-20 22:48:22 +02:00
!!! error TS1155: 'const' declarations must be initialized
~~
2014-10-20 22:48:22 +02:00
!!! error TS1155: 'const' declarations must be initialized
~~
2014-10-20 22:48:22 +02:00
!!! error TS1155: 'const' declarations must be initialized
for(const c in {}) { }
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