Inconsistent analysis for top-level module in F# script
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
In the script files, the following code is analysed in the editor without any errors
```F#
module A
let x = 3
```
but if you send this code to the FSI in any way (IDE, `dotnet fsi file.fsx`, `dotnet fsi --use:file.fsx`)
`FS0010: Unexpected start of structured construct in definition. Expected '=' or other token.` error will occur



Either top-level modules must be allowed in execution with fsi, or the corresponding error must be shown when analyzed in the editor.
* .NET 8
* Rider 2024.1 RC 1, VS Code, `dotnet fsi`
Contributor guide
Assessment
This issue has not been assessed yet.