Null-coalescing assignment seems to need not
This commit is contained in:
parent
6904c200e9
commit
9db69640b3
|
@ -25,7 +25,7 @@ This should instead read `if (x is null) x = y;`. The difference is in the
|
|||
operators: null-coalescing assignment, like the null-coalescing operator,
|
||||
does not consider user-defined operators like `==`. The spec also states that
|
||||
the semantics are equivalent to `x = x ?? y`, but that should instead be `(x
|
||||
?? (x = y))`. If `x` is null, the assignment is never performed.
|
||||
?? (x = y))`. If `x` is not null, the assignment is never performed.
|
||||
|
||||
|
||||
## Result type of the expression
|
||||
|
|
Loading…
Reference in a new issue