Commit 1a7bbce
[private named parameters] Allow non-reserved word public names.
To use a private named parameter, the corresponding public name must be
a valid identifier. One way it could be invalid is by being a reserved
word, as in:
```dart
class C({final String _if}); // Error.
```
However, other special identifiers that are not actually reserved words
are allowed:
```dart
class C({final String _async}); // OK.
```
This fixes that.
Change-Id: I6755a613910ae97e7db9b6a7f70e1cf0dd379b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465740
Auto-Submit: Bob Nystrom <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Paul Berry <[email protected]>1 parent 73d463c commit 1a7bbce
File tree
1 file changed
+11
-6
lines changed1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | | - | |
16 | | - | |
17 | 19 | | |
18 | | - | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
375 | 376 | | |
376 | 377 | | |
377 | 378 | | |
378 | | - | |
| 379 | + | |
| 380 | + | |
379 | 381 | | |
380 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
381 | 386 | | |
382 | 387 | | |
383 | 388 | | |
0 commit comments