Commit 1d08bd5
[analyzer] Dot shorthands: Allow potentially constant DotShorthandPropertyAccesses.
When we test for potentially-constant constants (ie. in asserts), we need to also test whether the identifier of a `DotShorthandPropertyAccess` is constant or not.
This CL adds one bit of logic and a few unit tests.
The language test `language/dot_shorthands/equality/equality_test` also covers this behavior and is passing.
Bug: #59835
Change-Id: I4e3daeb008c7dbadbb71d988012bf2e521df2e84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424661
Reviewed-by: Chloe Stefantsova <[email protected]>
Commit-Queue: Kallen Tu <[email protected]>1 parent 26b0c1f commit 1d08bd5
File tree
2 files changed
+53
-0
lines changed- pkg/analyzer
- lib/src/dart/constant
- test/src/dart/resolution
2 files changed
+53
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
100 | 149 | | |
101 | 150 | | |
102 | 151 | | |
| |||
0 commit comments