From 1f4cbcefb1cf0735a4925fb7420d338e596c71d5 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 11 Jan 2017 11:50:30 -0800 Subject: [PATCH] Remove incorrect type relationship --- src/compiler/checker.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8d949d6ac79..cc4afc8aa3e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7409,16 +7409,6 @@ namespace ts { } } } - else { - // Given a type parameter K with a constraint keyof T, a type S is - // assignable to K if S is assignable to keyof T. - const constraint = getConstraintOfTypeParameter(target); - if (constraint && constraint.flags & TypeFlags.Index) { - if (result = isRelatedTo(source, constraint, reportErrors)) { - return result; - } - } - } } else if (target.flags & TypeFlags.Index) { // A keyof S is related to a keyof T if T is related to S.