Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1
-
None
Description
The following code
a?.x = 1; a.x
returns 1 and creates ant-ish variable a.x in the evaluation context. The expected behaviour is to fail with assignment error because there is no a variable. As an alternative approach we can restrict safe-access operator at the left side of assignment at all, since there is no much sense in assigning anything to what can be null.