mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
22 lines
472 B
TypeScript
22 lines
472 B
TypeScript
//// [tests/cases/compiler/genericInheritedDefaultConstructors.ts] ////
|
|
|
|
//// [genericInheritedDefaultConstructors.ts]
|
|
// repro from #8166
|
|
interface Constructor<T> {
|
|
new(...args: any[]): T;
|
|
prototype: T;
|
|
}
|
|
|
|
class A<U> { a: U; }
|
|
class B<V> extends A<V> { b: V; }
|
|
var c:Constructor<B<boolean>> = B; // shouldn't error here
|
|
|
|
|
|
//// [genericInheritedDefaultConstructors.js]
|
|
"use strict";
|
|
class A {
|
|
}
|
|
class B extends A {
|
|
}
|
|
var c = B; // shouldn't error here
|