dotnet / dotnet/fsharp

StackOverflow typecheking code with some SRTPs

Open
#18,901 0 comments 1 reaction 0 assignees View on GitHub
Area-Compiler-Checking Area-Compiler-SRTP Area-Compiler-StateMachines Bug
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

Unfortunately, I don't have a very small repro.

Send [this gist](https://gist.github.com/majocha/3964a7a7db413edfcfcd3e3527c05c81) to fsi. It will stack overflow with endless loop in `FSharp.Compiler.TypedTreeOps.accFreeInTypes`

Image

Comment out line 274:

```fsharp
member inline this.Bind(awaitable: Awaitable<_, _, _>, continuation) = this.Bind(awaitable.GetAwaiter(), continuation)
```

and it will be fine again.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.