Null-coalescing assignment seems to need not

This commit is contained in:
Patrick Kranz 2018-09-13 15:45:41 +02:00 committed by GitHub
parent 6904c200e9
commit 9db69640b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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