Replies: 2 comments
-
Why not int? x = null;
x ??= 0;
x += 1; If compound assignments become lvalues, you will be able to write |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm not sure but I already think that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Simply put, we might have nullable number. Operator assignment cannot be used there
I think we should allow
??
to work on the left side of=
The problem here is we might have long chain of member access to use operator assignment
Normally we need to do it like this
It should be shorter with
??
But it should not work in this case
Beta Was this translation helpful? Give feedback.
All reactions