2014-07-26 17:13:52 +02:00
|
|
|
==== tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts (2 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
// all errors imported modules conflict with local variables
|
|
|
|
|
|
|
|
module A {
|
|
|
|
export var Point = { x: 0, y: 0 }
|
|
|
|
export interface Point {
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module B {
|
|
|
|
var A = { x: 0, y: 0 };
|
|
|
|
import Point = A;
|
2014-07-26 17:13:52 +02:00
|
|
|
~
|
|
|
|
!!! Module 'A' is hidden by a local declaration with the same name
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module X {
|
|
|
|
export module Y {
|
|
|
|
export interface Point{
|
|
|
|
x: number;
|
|
|
|
y: number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Y {
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module Z {
|
|
|
|
import Y = X.Y;
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
!!! Import declaration conflicts with local declaration of 'Y'
|
|
|
|
|
|
|
|
var Y = 12;
|
|
|
|
}
|