Emit a warning when referencing console applications exe's without a main
Open
Area-Diagnostics
Bug
Impact-Medium
Theme-Simple-F#
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Create a solution with two Console Application projects:
ConsoleApplication1\Program.fs:
``` f#
module SharedValue
let hello = "Hello" |> id
```
ConsoleApplication2\Program.fs (references ConsoleApplication1)
``` f#
match SharedValue.hello with
| null -> printfn "SharedValue.hello is null!"
| _ -> printfn "all good"
```
Expected output: `all good`
Actual output: `SharedValue.hello is null!`
needless to say, getting a null value from an F# project is quite surprising.
Changing the type of ConsoleApplication1 to a Library fixes this.
Contributor guide
Assessment
This issue has not been assessed yet.