Rename test output to match test name
This commit is contained in:
parent
0001b8cb37
commit
ae63df6cec
4 changed files with 52 additions and 41 deletions
|
@ -1,4 +1,4 @@
|
|||
//// [genericInheritedImplicitConstructors.ts]
|
||||
//// [genericInheritedDefaultConstructors.ts]
|
||||
interface Constructor<T> {
|
||||
new(...args: any[]): T;
|
||||
prototype: T;
|
||||
|
@ -7,13 +7,14 @@ interface Constructor<T> {
|
|||
class A<U> { a: U; }
|
||||
class B<V> extends A<V> { b: V; }
|
||||
var c:Constructor<B<boolean>> = B; // error here
|
||||
var x = new B<number>();
|
||||
|
||||
//class A1 { a: boolean; }
|
||||
//class B1 extends A1 { b: boolean; }
|
||||
//var c1:Constructor<B1> = B1; // no error here
|
||||
|
||||
|
||||
//// [genericInheritedImplicitConstructors.js]
|
||||
//// [genericInheritedDefaultConstructors.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
|
@ -32,6 +33,7 @@ var B = (function (_super) {
|
|||
return B;
|
||||
}(A));
|
||||
var c = B; // error here
|
||||
var x = new B();
|
||||
//class A1 { a: boolean; }
|
||||
//class B1 extends A1 { b: boolean; }
|
||||
//var c1:Constructor<B1> = B1; // no error here
|
|
@ -0,0 +1,42 @@
|
|||
=== tests/cases/compiler/genericInheritedDefaultConstructors.ts ===
|
||||
interface Constructor<T> {
|
||||
>Constructor : Symbol(Constructor, Decl(genericInheritedDefaultConstructors.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(genericInheritedDefaultConstructors.ts, 0, 22))
|
||||
|
||||
new(...args: any[]): T;
|
||||
>args : Symbol(args, Decl(genericInheritedDefaultConstructors.ts, 1, 8))
|
||||
>T : Symbol(T, Decl(genericInheritedDefaultConstructors.ts, 0, 22))
|
||||
|
||||
prototype: T;
|
||||
>prototype : Symbol(Constructor.prototype, Decl(genericInheritedDefaultConstructors.ts, 1, 27))
|
||||
>T : Symbol(T, Decl(genericInheritedDefaultConstructors.ts, 0, 22))
|
||||
}
|
||||
|
||||
class A<U> { a: U; }
|
||||
>A : Symbol(A, Decl(genericInheritedDefaultConstructors.ts, 3, 1))
|
||||
>U : Symbol(U, Decl(genericInheritedDefaultConstructors.ts, 5, 8))
|
||||
>a : Symbol(A.a, Decl(genericInheritedDefaultConstructors.ts, 5, 12))
|
||||
>U : Symbol(U, Decl(genericInheritedDefaultConstructors.ts, 5, 8))
|
||||
|
||||
class B<V> extends A<V> { b: V; }
|
||||
>B : Symbol(B, Decl(genericInheritedDefaultConstructors.ts, 5, 20))
|
||||
>V : Symbol(V, Decl(genericInheritedDefaultConstructors.ts, 6, 8))
|
||||
>A : Symbol(A, Decl(genericInheritedDefaultConstructors.ts, 3, 1))
|
||||
>V : Symbol(V, Decl(genericInheritedDefaultConstructors.ts, 6, 8))
|
||||
>b : Symbol(B.b, Decl(genericInheritedDefaultConstructors.ts, 6, 25))
|
||||
>V : Symbol(V, Decl(genericInheritedDefaultConstructors.ts, 6, 8))
|
||||
|
||||
var c:Constructor<B<boolean>> = B; // error here
|
||||
>c : Symbol(c, Decl(genericInheritedDefaultConstructors.ts, 7, 3))
|
||||
>Constructor : Symbol(Constructor, Decl(genericInheritedDefaultConstructors.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(genericInheritedDefaultConstructors.ts, 5, 20))
|
||||
>B : Symbol(B, Decl(genericInheritedDefaultConstructors.ts, 5, 20))
|
||||
|
||||
var x = new B<number>();
|
||||
>x : Symbol(x, Decl(genericInheritedDefaultConstructors.ts, 8, 3))
|
||||
>B : Symbol(B, Decl(genericInheritedDefaultConstructors.ts, 5, 20))
|
||||
|
||||
//class A1 { a: boolean; }
|
||||
//class B1 extends A1 { b: boolean; }
|
||||
//var c1:Constructor<B1> = B1; // no error here
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
=== tests/cases/compiler/genericInheritedImplicitConstructors.ts ===
|
||||
=== tests/cases/compiler/genericInheritedDefaultConstructors.ts ===
|
||||
interface Constructor<T> {
|
||||
>Constructor : Constructor<T>
|
||||
>T : T
|
||||
|
@ -32,6 +32,11 @@ var c:Constructor<B<boolean>> = B; // error here
|
|||
>B : B<V>
|
||||
>B : typeof B
|
||||
|
||||
var x = new B<number>();
|
||||
>x : B<number>
|
||||
>new B<number>() : B<number>
|
||||
>B : typeof B
|
||||
|
||||
//class A1 { a: boolean; }
|
||||
//class B1 extends A1 { b: boolean; }
|
||||
//var c1:Constructor<B1> = B1; // no error here
|
|
@ -1,38 +0,0 @@
|
|||
=== tests/cases/compiler/genericInheritedImplicitConstructors.ts ===
|
||||
interface Constructor<T> {
|
||||
>Constructor : Symbol(Constructor, Decl(genericInheritedImplicitConstructors.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(genericInheritedImplicitConstructors.ts, 0, 22))
|
||||
|
||||
new(...args: any[]): T;
|
||||
>args : Symbol(args, Decl(genericInheritedImplicitConstructors.ts, 1, 8))
|
||||
>T : Symbol(T, Decl(genericInheritedImplicitConstructors.ts, 0, 22))
|
||||
|
||||
prototype: T;
|
||||
>prototype : Symbol(Constructor.prototype, Decl(genericInheritedImplicitConstructors.ts, 1, 27))
|
||||
>T : Symbol(T, Decl(genericInheritedImplicitConstructors.ts, 0, 22))
|
||||
}
|
||||
|
||||
class A<U> { a: U; }
|
||||
>A : Symbol(A, Decl(genericInheritedImplicitConstructors.ts, 3, 1))
|
||||
>U : Symbol(U, Decl(genericInheritedImplicitConstructors.ts, 5, 8))
|
||||
>a : Symbol(A.a, Decl(genericInheritedImplicitConstructors.ts, 5, 12))
|
||||
>U : Symbol(U, Decl(genericInheritedImplicitConstructors.ts, 5, 8))
|
||||
|
||||
class B<V> extends A<V> { b: V; }
|
||||
>B : Symbol(B, Decl(genericInheritedImplicitConstructors.ts, 5, 20))
|
||||
>V : Symbol(V, Decl(genericInheritedImplicitConstructors.ts, 6, 8))
|
||||
>A : Symbol(A, Decl(genericInheritedImplicitConstructors.ts, 3, 1))
|
||||
>V : Symbol(V, Decl(genericInheritedImplicitConstructors.ts, 6, 8))
|
||||
>b : Symbol(B.b, Decl(genericInheritedImplicitConstructors.ts, 6, 25))
|
||||
>V : Symbol(V, Decl(genericInheritedImplicitConstructors.ts, 6, 8))
|
||||
|
||||
var c:Constructor<B<boolean>> = B; // error here
|
||||
>c : Symbol(c, Decl(genericInheritedImplicitConstructors.ts, 7, 3))
|
||||
>Constructor : Symbol(Constructor, Decl(genericInheritedImplicitConstructors.ts, 0, 0))
|
||||
>B : Symbol(B, Decl(genericInheritedImplicitConstructors.ts, 5, 20))
|
||||
>B : Symbol(B, Decl(genericInheritedImplicitConstructors.ts, 5, 20))
|
||||
|
||||
//class A1 { a: boolean; }
|
||||
//class B1 extends A1 { b: boolean; }
|
||||
//var c1:Constructor<B1> = B1; // no error here
|
||||
|
Loading…
Reference in a new issue