Allow null-conditional access operator when accessing a pointer type #8822
Replies: 5 comments
-
Duplicate of #398. |
Beta Was this translation helpful? Give feedback.
-
That did not cover this operator explicitly 🙂 , it appeared they were suggesting |
Beta Was this translation helpful? Give feedback.
-
This does seem like an interesting case that isn't quite covered by #323 or #398. To be clear, is the idea here that |
Beta Was this translation helpful? Give feedback.
-
Yes, exactly @yaakov-h |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? Due to Unity I would be using ?? ??= ?. on pointers a lot, ref returns and ref structs are a pain. Thanks. Oh yeah and allowing pointers to be used in Generic type parameters would be great too, thanks :). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, this code does not compile
I suggest this should be legal, and return
null
if the left hand side isnull
, as is currently done with reference typesBeta Was this translation helpful? Give feedback.
All reactions