Unions with 4 or more cases silently fail to utilize UseNullAsTrueValue.
Open
Area-Compiler-Checking
Bug
Impact-Low
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Repro. case in F# 4.4.0.0 -
```
[]
type T = A | B of int | C of int | D of int;;
A;;
```
In F# interactive, here you'll see that A is a proper value, which is not desired.
```
[]
type T = A | B of int | C of int;;
A;;
```
In F# interactive, here you'll see that A is a null, which is desired.
Would be a nice optimization to have this work for 4 cases as here - https://github.com/bryanedds/Prime/blob/master/Prime/Prime/Prime/Vmap.fs#L25-L30
NOTE: Issue moved from here - https://github.com/fsharp/fsharp/issues/510
Cheers!
Contributor guide
Assessment
This issue has not been assessed yet.