Create List<TypeParameterElement>, not Impl.

Otherwise this Impl type gets propagated via toList(), and we get
a cast failure when attempt to assign TypeParameterMember element to
it. I'd like that we did not use TypeParameterMember at all, but
for now we do.

R=brianwilkerson@google.com

Change-Id: I03e1392fbd52d5a0fc7c257265d17d1cbd391edb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99718
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Konstantin Shcheglov 2019-04-18 20:15:26 +00:00
parent fa7485f28e
commit f8491950fe

View file

@ -9444,7 +9444,8 @@ mixin TypeParameterizedElementMixin
if (typeParameters == null) {
return _typeParameterElements = const [];
}
return _typeParameterElements = typeParameters.typeParameters.map((node) {
return _typeParameterElements =
typeParameters.typeParameters.map<TypeParameterElement>((node) {
TypeParameterElementImpl element = node.declaredElement;
element.enclosingElement = this;
return element;