This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit 3c34c8f
Fix type substitution of "star" types.
When performing type substitution, there are three types involved, the
substitution site (`this` in TypeImpl.substitute2), the type we are
replacing (`parameterType` in TypeImpl.substitute2), and the
replacement type (`argumentType` in TypeImpl.substitute2).
Previously, we only handled the nullabilities of `this` and
`argumentType`. This CL adds support for the possibility that
`parameterType` might have nullability "*". This happens because
TypeParameterElement.type returns a star type, so for instance when
subsituting `int` for `T` in `List<T>` to form `List<int>`, we are
actually substituting `int` for `T*` in `List<T*>`.
Change-Id: I0a61fdc47ec8aa205dc0c539c49ea7799ed4ac05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103542
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>1 parent 77f2603 commit 3c34c8f
File tree
2 files changed
+23
-21
lines changed- pkg/analyzer
- lib/src/dart/element
- test/src/diagnostics
2 files changed
+23
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3244 | 3244 | | |
3245 | 3245 | | |
3246 | 3246 | | |
3247 | | - | |
| 3247 | + | |
| 3248 | + | |
3248 | 3249 | | |
3249 | 3250 | | |
3250 | 3251 | | |
| |||
3254 | 3255 | | |
3255 | 3256 | | |
3256 | 3257 | | |
| 3258 | + | |
| 3259 | + | |
3257 | 3260 | | |
3258 | | - | |
3259 | | - | |
3260 | | - | |
3261 | | - | |
3262 | | - | |
3263 | | - | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
3264 | 3278 | | |
3265 | | - | |
| 3279 | + | |
| 3280 | + | |
3266 | 3281 | | |
3267 | 3282 | | |
3268 | 3283 | | |
| |||
Lines changed: 0 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | | - | |
42 | | - | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
| |||
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 48 | | |
62 | 49 | | |
63 | 50 | | |
| |||
0 commit comments