41 lines
1.7 KiB
Plaintext
41 lines
1.7 KiB
Plaintext
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(1,5): error TS2300: Duplicate identifier 'v'.
|
|
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(3,14): error TS2300: Duplicate identifier 'v'.
|
|
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(6,10): error TS2300: Duplicate identifier 'w'.
|
|
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(8,9): error TS2300: Duplicate identifier 'w'.
|
|
tests/cases/compiler/duplicateIdentifierInCatchBlock.ts(12,9): error TS2300: Duplicate identifier 'x'.
|
|
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'.
|
|
|
|
|
|
==== tests/cases/compiler/duplicateIdentifierInCatchBlock.ts (7 errors) ====
|
|
var v;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'v'.
|
|
try { } catch (e) {
|
|
function v() { }
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'v'.
|
|
}
|
|
|
|
function w() { }
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'w'.
|
|
try { } catch (e) {
|
|
var w;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'w'.
|
|
}
|
|
|
|
try { } catch (e) {
|
|
var x;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
function x() { } // error
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
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'.
|
|
} |