dotnet / dotnet/csharpstandard

10.4.4.26/27 Definite assignment rules for && and || should not apply to custom operators

Open
#117 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.