Can't #load recursive namespaces into FSI
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
A file with a recursive namespace reference can't be loaded in FSI. This is similar to [#237](https://github.com/dotnet/fsharp/issues/237).
It _does_ compile as part of a project.
**Steps to reproduce:**
1. Create a file named "test.fs" containing:
```fsharp
namespace rec FakeNamespaceName
module AType =
type InnerType =
member x.AMethod: FakeNamespaceName.AType2 = { AField = "test" }
type AType2 = { AField: string }
```
2. Load the file in FSI:
```
#load "test.fs"
```
**Expected behavior**
The file is loaded into FSI.
**Actual behavior**
FSI gives this error:
test.fs(6,25): error FS0039: The namespace or module 'FakeNamespaceName' is not defined.
**Known workarounds**
* Don't use recursive namespaces with FSI
* Compile the code into an assembly and load that into FSI
**Related information**
Provide any related information (optional):
* Microsoft (R) F# Interactive version 12.0.4.0 for F# 6.0
Contributor guide
Assessment
This issue has not been assessed yet.