Consider reporting a warning when a short-circuiting logic operator has a nullable boolean as its first operand
Open
Proposal
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
[The spec says this](https://github.com/dotnet/vblang/blob/master/spec/expressions.md#short-circuiting-logical-operators):
> In the lifted form of the AndAlso and OrElse operators, if the first operand was a null Boolean?, then the second operand is evaluated but the result is always a null Boolean?.
While that's logically consistent with the VB treatment of nullable Booleans it's somewhat contrary to the benefit of a short-circuiting operator and totally unintuitive. We should consider reporting a warning in such cases.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.