Closed
Description
According to the documentation, the constructor for const Symbol()
does not accept private names. The only other way to construct a constant symbol is via the #...
notation, e.g. #_x
. However, this doesn't work for names of setters, e.g. _x=
, because #_x=
isn't syntactically correct.
How can the name of a private setter be expressed as a constant symbol?
For reference, I'm updating the mock_writable_final_private_field_test.dart
which is currently exploiting an incorrect behavior in the VM to do this. The VM currently allows creating a private symbol in this way, but it is not correctly mangled.