From 80f523c13a2aad6ee8fc279091900acaef19197a Mon Sep 17 00:00:00 2001 From: Jason Freeman Date: Fri, 12 Jun 2015 13:57:55 -0700 Subject: [PATCH] Change depth limit from 10 to 5 in isDeeplyNestedGeneric --- src/compiler/checker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 12a048ae6cb..a169ee46274 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4801,14 +4801,14 @@ module ts { // some level beyond that. function isDeeplyNestedGeneric(type: Type, stack: Type[], depth: number): boolean { // We track type references (created by createTypeReference) and instantiated types (created by instantiateType) - if (type.flags & (TypeFlags.Reference | TypeFlags.Instantiated) && depth >= 10) { + if (type.flags & (TypeFlags.Reference | TypeFlags.Instantiated) && depth >= 5) { let symbol = type.symbol; let count = 0; for (let i = 0; i < depth; i++) { let t = stack[i]; if (t.flags & (TypeFlags.Reference | TypeFlags.Instantiated) && t.symbol === symbol) { count++; - if (count >= 10) return true; + if (count >= 5) return true; } } }