From 38e3d9f71809231a99d73b382ca8ddc351fa74b2 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 16 Jun 2015 11:53:00 -0700 Subject: [PATCH] Adding another comment --- src/compiler/checker.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 88ab42b9bed..e0407261e9d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10662,6 +10662,8 @@ module ts { checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); if (!(staticBaseType.symbol && staticBaseType.symbol.flags & SymbolFlags.Class)) { + // When the static base type is a "class-like" constructor function (but not actually a class), we verify + // that all instantiated base constructor signatures return the same type. let constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments); if (forEach(constructors, sig => getReturnTypeOfSignature(sig) !== baseType)) { error(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type);