TypeScript/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt

41 lines
1.7 KiB
Plaintext
Raw Normal View History

2014-10-01 02:15:18 +02:00
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(1,5): error TS2300: Duplicate identifier 'v'.
2014-10-01 20:27:20 +02:00
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(3,14): error TS2300: Duplicate identifier 'v'.
2014-10-01 02:15:18 +02:00
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(6,10): error TS2300: Duplicate identifier 'w'.
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(8,9): error TS2300: Duplicate identifier 'w'.
2014-10-01 02:15:18 +02:00
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(12,9): error TS2300: Duplicate identifier 'x'.
2014-10-01 20:27:20 +02:00
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(13,14): error TS2300: Duplicate identifier 'x'.
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(16,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'.
2014-10-01 02:15:18 +02:00
==== tests/cases/compiler/duplicateIdentifierInCatchBlock.ts (7 errors) ====
2014-07-13 01:04:16 +02:00
var v;
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'v'.
2014-07-13 01:04:16 +02:00
try { } catch (e) {
function v() { }
2014-10-01 20:27:20 +02:00
~
!!! error TS2300: Duplicate identifier 'v'.
2014-07-13 01:04:16 +02:00
}
function w() { }
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'w'.
2014-07-13 01:04:16 +02:00
try { } catch (e) {
var w;
~
!!! error TS2300: Duplicate identifier 'w'.
2014-07-13 01:04:16 +02:00
}
try { } catch (e) {
var x;
2014-10-01 02:15:18 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
function x() { } // error
2014-10-01 20:27:20 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
function e() { } // error
var p: string;
var p: number; // error
~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'.
2014-07-13 01:04:16 +02:00
}