mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Add test case
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
//// [ambientClassDeclarationWithExtends.ts]
|
||||
declare class A { }
|
||||
declare class B extends A { }
|
||||
|
||||
declare class C {
|
||||
public foo;
|
||||
}
|
||||
namespace D { var x; }
|
||||
declare class D extends C { }
|
||||
|
||||
var d: C = new D();
|
||||
|
||||
|
||||
//// [ambientClassDeclarationWithExtends.js]
|
||||
var D;
|
||||
(function (D) {
|
||||
var x;
|
||||
})(D || (D = {}));
|
||||
var d = new D();
|
||||
|
||||
@@ -6,3 +6,22 @@ declare class B extends A { }
|
||||
>B : Symbol(B, Decl(ambientClassDeclarationWithExtends.ts, 0, 19))
|
||||
>A : Symbol(A, Decl(ambientClassDeclarationWithExtends.ts, 0, 0))
|
||||
|
||||
declare class C {
|
||||
>C : Symbol(C, Decl(ambientClassDeclarationWithExtends.ts, 1, 29))
|
||||
|
||||
public foo;
|
||||
>foo : Symbol(foo, Decl(ambientClassDeclarationWithExtends.ts, 3, 17))
|
||||
}
|
||||
namespace D { var x; }
|
||||
>D : Symbol(D, Decl(ambientClassDeclarationWithExtends.ts, 5, 1), Decl(ambientClassDeclarationWithExtends.ts, 6, 22))
|
||||
>x : Symbol(x, Decl(ambientClassDeclarationWithExtends.ts, 6, 17))
|
||||
|
||||
declare class D extends C { }
|
||||
>D : Symbol(D, Decl(ambientClassDeclarationWithExtends.ts, 5, 1), Decl(ambientClassDeclarationWithExtends.ts, 6, 22))
|
||||
>C : Symbol(C, Decl(ambientClassDeclarationWithExtends.ts, 1, 29))
|
||||
|
||||
var d: C = new D();
|
||||
>d : Symbol(d, Decl(ambientClassDeclarationWithExtends.ts, 9, 3))
|
||||
>C : Symbol(C, Decl(ambientClassDeclarationWithExtends.ts, 1, 29))
|
||||
>D : Symbol(D, Decl(ambientClassDeclarationWithExtends.ts, 5, 1), Decl(ambientClassDeclarationWithExtends.ts, 6, 22))
|
||||
|
||||
|
||||
@@ -6,3 +6,23 @@ declare class B extends A { }
|
||||
>B : B
|
||||
>A : A
|
||||
|
||||
declare class C {
|
||||
>C : C
|
||||
|
||||
public foo;
|
||||
>foo : any
|
||||
}
|
||||
namespace D { var x; }
|
||||
>D : typeof D
|
||||
>x : any
|
||||
|
||||
declare class D extends C { }
|
||||
>D : D
|
||||
>C : C
|
||||
|
||||
var d: C = new D();
|
||||
>d : C
|
||||
>C : C
|
||||
>new D() : D
|
||||
>D : typeof D
|
||||
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
declare class A { }
|
||||
declare class B extends A { }
|
||||
|
||||
declare class C {
|
||||
public foo;
|
||||
}
|
||||
namespace D { var x; }
|
||||
declare class D extends C { }
|
||||
|
||||
var d: C = new D();
|
||||
|
||||
Reference in New Issue
Block a user