From 7f6c49e23b78713113cf09e249bb826703c24efc Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 5 Apr 2017 14:09:12 -0700 Subject: [PATCH] Check TypeFlags.Any instead of anyType&unknownType --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1a1b5ebc97a..59e1db0e227 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4617,7 +4617,7 @@ namespace ts { error(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); return type.resolvedBaseConstructorType = unknownType; } - if (baseConstructorType !== anyType && baseConstructorType !== unknownType && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) { + if (!(baseConstructorType.flags & TypeFlags.Any) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) { error(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); return type.resolvedBaseConstructorType = unknownType; }