Open generics in null coalescing operator
- Dominant language
- No language data
- Stars
- 328
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
We are considering a change to the behavior and spec for operands to null coalescing operators. The relevant part of the spec is [here](https://github.com/dotnet/vblang/blob/master/spec/expressions.md#conditional-expressions) and the effect would be allowing unconstrained types. Where we currently say:
> If two operands are provided, both of the operands must be classified as values, and the first operand must be either a reference type or a nullable value type.
We would update the spec to say:
> If two operands are provided, both of the operands must be classified as values, and the first operand must not be a non-nullable value type.
C# has this proposed [here](https://github.com/dotnet/csharplang/blob/master/proposals/null-coalescing-assignment.md#detailed-design) and I'd like us to tag along.
Can anyone see a backwards compatibility issue? This seems just goodness to me.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.