You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const_=2; // error: `_` is not a declarable symbolconst @"_"=2; // okconstbool=2; // error: variable shadows primitive type 'bool'const @"bool"=2; // ok
The text was updated successfully, but these errors were encountered:
Vexu
added
the
proposal
This issue suggests modifications. If it also has the "accepted" label then it is planned.
label
Aug 15, 2020
It would make sense for them to be distinct since bool is a constant and allowing it to be modified by an alias would result in some really strange behavior.
No. This works because the identifiers using the @"" syntax are actually strings that need to be resolved first. The main difference between the two approaches is that this doesn't make them into keywords. This will be most noticeable in container fields where using bool will remain valid while the other proposal would require using @"bool".
Originally from here: #6060 (comment)
Alternative to #1802
The text was updated successfully, but these errors were encountered: