TypeScript/tests/baselines/reference/duplicateIdentifierInCatchBlock.errors.txt
2014-07-12 17:30:19 -07:00

26 lines
697 B
Plaintext

==== tests/cases/compiler/duplicateIdentifierInCatchBlock.ts (4 errors) ====
var v;
try { } catch (e) {
function v() { }
~
!!! Duplicate identifier 'v'.
}
function w() { }
try { } catch (e) {
var w;
~
!!! Duplicate identifier 'w'.
}
try { } catch (e) {
var x;
function x() { } // error
~
!!! Duplicate identifier 'x'.
function e() { } // error
var p: string;
var p: number; // error
~
!!! Subsequent variable declarations must have the same type. Variable 'p' must be of type 'string', but here has type 'number'.
}