Skip to content

Commit 2a240dd

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Don't create accessors/fields typed as Impl.
DDC code generator copies these lists using toList(), so inherits their reified types, and then fails to add a PropertyAccessorMember, which is not an Impl. [email protected] Change-Id: Id26ef7bcea07b9956ebf7487883fbbf9f92cf7ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106301 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent df8e0af commit 2a240dd

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,8 +1323,8 @@ class ClassElementImpl extends AbstractClassElementImpl
13231323
assert(_fields == null);
13241324

13251325
var context = enclosingUnit.linkedContext;
1326-
var accessorList = <PropertyAccessorElementImpl>[];
1327-
var fieldList = <FieldElementImpl>[];
1326+
var accessorList = <PropertyAccessorElement>[];
1327+
var fieldList = <FieldElement>[];
13281328

13291329
var fields = context.getFields(linkedNode);
13301330
for (var field in fields) {
@@ -2164,18 +2164,18 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
21642164
assert(unit._accessors == null);
21652165

21662166
var accessorMap =
2167-
<CompilationUnitElementImpl, List<PropertyAccessorElementImpl>>{};
2167+
<CompilationUnitElementImpl, List<PropertyAccessorElement>>{};
21682168
var variableMap =
2169-
<CompilationUnitElementImpl, List<TopLevelVariableElementImpl>>{};
2169+
<CompilationUnitElementImpl, List<TopLevelVariableElement>>{};
21702170

21712171
var units = unit.library.units;
21722172
for (CompilationUnitElementImpl unit in units) {
21732173
var context = unit.linkedContext;
21742174

2175-
var accessorList = <PropertyAccessorElementImpl>[];
2175+
var accessorList = <PropertyAccessorElement>[];
21762176
accessorMap[unit] = accessorList;
21772177

2178-
var variableList = <TopLevelVariableElementImpl>[];
2178+
var variableList = <TopLevelVariableElement>[];
21792179
variableMap[unit] = variableList;
21802180

21812181
var unitNode = unit.linkedContext.unit_withDeclarations;

0 commit comments

Comments
 (0)