Skip to content

Commit 38e3d9f

Browse files
committed
Adding another comment
1 parent de8eb22 commit 38e3d9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/checker.ts

+2
Original file line numberDiff line numberDiff line change
@@ -10662,6 +10662,8 @@ module ts {
1066210662
checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node,
1066310663
Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1);
1066410664
if (!(staticBaseType.symbol && staticBaseType.symbol.flags & SymbolFlags.Class)) {
10665+
// When the static base type is a "class-like" constructor function (but not actually a class), we verify
10666+
// that all instantiated base constructor signatures return the same type.
1066510667
let constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments);
1066610668
if (forEach(constructors, sig => getReturnTypeOfSignature(sig) !== baseType)) {
1066710669
error(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type);

0 commit comments

Comments
 (0)