2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/conformance/internalModules/codeGeneration/importStatementsInterfaces.ts (1 errors) ====
|
|
|
|
module A {
|
|
|
|
export interface Point {
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export module inA {
|
|
|
|
export interface Point3D extends Point {
|
|
|
|
z: number;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// no code gen expected
|
|
|
|
module B {
|
|
|
|
import a = A;
|
|
|
|
}
|
|
|
|
|
|
|
|
// no code gen expected
|
|
|
|
module C {
|
|
|
|
import a = A;
|
|
|
|
import b = a.inA;
|
|
|
|
var m: typeof a;
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'a'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var p: b.Point3D;
|
|
|
|
var p = {x:0, y:0, z: 0 };
|
|
|
|
}
|
|
|
|
|
|
|
|
// no code gen expected
|
|
|
|
module D {
|
|
|
|
import a = A;
|
|
|
|
|
|
|
|
var p : a.Point;
|
|
|
|
}
|
|
|
|
|
|
|
|
// no code gen expected
|
|
|
|
module E {
|
|
|
|
import a = A.inA;
|
|
|
|
export function xDist(x: a.Point3D) {
|
|
|
|
return 0 - x.x;
|
|
|
|
}
|
|
|
|
}
|