dotnet / dotnet/csharpstandard
10.4.4.26/27 Definite assignment rules for && and || should not apply to custom operators
Open
type: bug
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
See https://github.com/dotnet/roslyn/issues/4509 for background.
The clever rules around `||` and `&&` which allow for some "extra" definite assignments should _not_ be applied when using a custom `&` operator (and `false` operator) because otherwise they can lead to some weird cases where we'd allow reading from unassigned variables.
Contributor guide
Assessment
This issue has not been assessed yet.