Skip to content

Consider reporting a warning when a short-circuiting logic operator has a nullable boolean as its first operand #70

Open
@AnthonyDGreen

Description

@AnthonyDGreen

The spec says this:

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions