Commit 78b2708
[analyzer] Dot shorthand: Update constant verification for default parameter values.
The constant visitor was missing an extra check that we had for instance creation expressions, but not for dot shorthand constructor invocations. It's definitely a little funky because of how we've chained up the ConstantVisitor + ConstantVerifier, but this is how we currently handle this error.
Added a unit test.
Fixes: #60962
Bug: #59835
Change-Id: I76489a425c5e01c4d9edb34ac6dc62f109e6a32a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436821
Commit-Queue: Kallen Tu <[email protected]>
Reviewed-by: Chloe Stefantsova <[email protected]>1 parent c7765a8 commit 78b2708
File tree
2 files changed
+21
-0
lines changed- pkg/analyzer
- lib/src/dart/constant
- test/src/diagnostics
2 files changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
899 | 907 | | |
900 | 908 | | |
901 | 909 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
| |||
0 commit comments