Skip to content

Commit 9e64c73

Browse files
authored
Prevent infinite recursion in TypeUtils.resolveTypeForPipeCompletion by not looping over type variables (#1112)
* Prevent infinite recursion in TypeUtils.resolveTypeForPipeCompletion by not looping over type variables * Add CHANGELOG entry
1 parent 2671852 commit 9e64c73

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#### :bug: Bug fix
2121

22+
- Fix: hang in `rescript-editor-analysis.exe codeAction` that sometimes prevented ReScript files from being saved in VS Code. https://github.com/rescript-lang/rescript-vscode/pull/1112
23+
2224
- Fix: show existing compiler errors and warnings on file open. https://github.com/rescript-lang/rescript-vscode/pull/1103
2325

2426
- Fix: bug where we incorrectly showed a warning notification about something going wrong with incremental type checking, when in fact the compiler was reporting module-related type errors https://github.com/rescript-lang/rescript-vscode/pull/1090

analysis/src/TypeUtils.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ let rec resolveTypeForPipeCompletion ~env ~package ~lhsLoc ~full
533533
| _ -> None
534534
in
535535
match typFromLoc with
536+
| Some ({desc = Tvar _} as t) -> (env, t)
536537
| Some typFromLoc ->
537538
typFromLoc |> resolveTypeForPipeCompletion ~lhsLoc ~env ~package ~full
538539
| None ->

0 commit comments

Comments
 (0)