dotnet / dotnet/vblang

Spec bug for lifted short-circuiting Logical Operators

Open
#478 6 comments 0 reactions 0 assignees View on GitHub
Spec-Defect
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

In 11.17.1 the VB specification says

> 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?`.

But this is not correct nor what is implemented (at least for the types `Boolean?`). It should say

> In the lifted form of the `AndAlso` and `OrElse` operators, if the first operand was a null `Boolean?`, then the second operand is evaluated and is the result.

I'm not sure how this affects these operators in the presence of a user-declared type with `IsTrue` `IsFalse`, `And` and `Or`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.