We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 971b5ea commit cc9987eCopy full SHA for cc9987e
analysis/src/TypeUtils.ml
@@ -540,6 +540,10 @@ let rec resolveTypeForPipeCompletion ~env ~package ~lhsLoc ~full ?(depth = 0)
540
in
541
match typFromLoc with
542
| Some typFromLoc ->
543
+ (* Prevent infinite loops when `typFromLoc` is a type variable by bailing out after
544
+ 10 iterations.
545
+ TODO: fix the root of the issue (probably in `findReturnTypeOfFunctionAtLoc`)
546
+ instead of enforcing a maximum number of iterations. *)
547
if depth > 10 then (env, typFromLoc)
548
else
549
typFromLoc
0 commit comments