TypeScript/tests/cases/compiler/duplicateVariablesWithAny.ts

17 lines
260 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
// They should have to be the same even when one of the types is 'any'
var x: any;
var x = 2; //error
var y = "";
var y; //error
module N {
var x: any;
var x = 2; //error
var y = "";
var y; //error
}
var z: any;
var z; // ok