Small codegen improvement when "?." is used in branch conditions.
When conditional access operator is used as a branch condition, it is often unnecessary to emit actual bool values.
Example:
if (arr?.Length > 0)
{
...
}
In simple cases like above the branches can be emitted directly based on null-ness of arr, truth-ness of the access and the sense of the condition.
.
(changeset 1342701)
↧