3c34c8fa2f
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 <paulberry@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>