Merge pull request #6634 from Microsoft/port_6628

Port #6628 into release 1.8
This commit is contained in:
Vladimir Matveev
2016-01-27 11:02:07 -08:00
5 changed files with 37 additions and 1 deletions

View File

@@ -4285,7 +4285,7 @@ namespace ts {
function hasConstraintReferenceTo(type: Type, target: TypeParameter): boolean {
let checked: Type[];
while (type && type.flags & TypeFlags.TypeParameter && !contains(checked, type)) {
while (type && !(type.flags & TypeFlags.ThisType) && type.flags & TypeFlags.TypeParameter && !contains(checked, type)) {
if (type === target) {
return true;
}