Commit ded5f0b
[analyzer] Dot shorthands: Report error for using enum constructor.
Added an additional error check for `CompileTimeErrorCode.INVALID_REFERENCE_TO_GENERATIVE_ENUM_CONSTRUCTOR`. Refactored the helper slightly to allow dot shorthand constructor invocations to be able to use it.
Added a unit test.
Bug: #59835
Change-Id: I4eee2a3464913cdba0e213aa47a29faad2141937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428222
Commit-Queue: Kallen Tu <[email protected]>
Reviewed-by: Chloe Stefantsova <[email protected]>1 parent 2565d07 commit ded5f0b
File tree
2 files changed
+51
-11
lines changed- pkg/analyzer
- lib/src/generated
- test/src/dart/resolution
2 files changed
+51
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
631 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
632 | 635 | | |
633 | 636 | | |
634 | 637 | | |
| |||
650 | 653 | | |
651 | 654 | | |
652 | 655 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
658 | 664 | | |
659 | 665 | | |
660 | 666 | | |
| |||
1096 | 1102 | | |
1097 | 1103 | | |
1098 | 1104 | | |
1099 | | - | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1100 | 1109 | | |
1101 | 1110 | | |
1102 | 1111 | | |
| |||
3823 | 3832 | | |
3824 | 3833 | | |
3825 | 3834 | | |
3826 | | - | |
3827 | | - | |
| 3835 | + | |
| 3836 | + | |
| 3837 | + | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
3828 | 3841 | | |
3829 | 3842 | | |
3830 | 3843 | | |
| |||
3834 | 3847 | | |
3835 | 3848 | | |
3836 | 3849 | | |
3837 | | - | |
| 3850 | + | |
3838 | 3851 | | |
3839 | 3852 | | |
3840 | 3853 | | |
| |||
5029 | 5042 | | |
5030 | 5043 | | |
5031 | 5044 | | |
5032 | | - | |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
5033 | 5049 | | |
5034 | 5050 | | |
5035 | 5051 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
345 | 369 | | |
346 | 370 | | |
347 | 371 | | |
| |||
0 commit comments