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

51 lines
1.3 KiB
Plaintext

==== tests/cases/compiler/augmentedTypesVar.ts (7 errors) ====
// var then var
var x1 = 1;
var x1 = 2;
// var then function
var x2 = 1;
function x2() { } // should be an error
~~
!!! Duplicate identifier 'x2'.
var x3 = 1;
var x3 = () => { } // should be an error
~~
!!! Subsequent variable declarations must have the same type. Variable 'x3' must be of type 'number', but here has type '() => void'.
// var then class
var x4 = 1;
class x4 { } // error
~~
!!! Duplicate identifier 'x4'.
var x4a = 1;
class x4a { public foo() { } } // error
~~~
!!! Duplicate identifier 'x4a'.
// var then enum
var x5 = 1;
enum x5 { One } // error
~~
!!! Duplicate identifier 'x5'.
// var then module
var x6 = 1;
module x6 { } // ok since non-instantiated
var x6a = 1;
module x6a { var y = 2; } // error since instantiated
~~~
!!! Duplicate identifier 'x6a'.
var x6b = 1;
module x6b { export var y = 2; } // error
~~~
!!! Duplicate identifier 'x6b'.
// var then import, messes with other error reporting
//var x7 = 1;
//import x7 = require('');