Skip to content

Commit ea94702

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Remove _resolveConstructorFieldFormals() from ElementBuilder.
With augmentations we should not do this, and we do it in LibraryBuilder already. Change-Id: Ib642081de60d7c216824e500778f8444a87b63d4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391484 Reviewed-by: Keerti Parthasarathy <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 3af9430 commit ea94702

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

pkg/analyzer/lib/src/summary2/element_builder.dart

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,6 @@ class ElementBuilder extends ThrowingAstVisitor<void> {
601601

602602
node.implementsClause?.accept(this);
603603

604-
// TODO(scheglov): We cannot do this anymore.
605-
// Not for class augmentations, not for classes.
606-
_resolveConstructorFieldFormals(element);
607-
608604
if (element.augmentationTarget != null) {
609605
var builder = _libraryBuilder.getAugmentedBuilder(name);
610606
if (builder is AugmentedExtensionTypeDeclarationBuilder) {
@@ -1574,16 +1570,6 @@ class ElementBuilder extends ThrowingAstVisitor<void> {
15741570
representation.fieldType.accept(this);
15751571
}
15761572

1577-
void _resolveConstructorFieldFormals(InterfaceElementImpl element) {
1578-
for (var constructor in element.constructors) {
1579-
for (var parameter in constructor.parameters) {
1580-
if (parameter is FieldFormalParameterElementImpl) {
1581-
parameter.field = element.getField(parameter.name);
1582-
}
1583-
}
1584-
}
1585-
}
1586-
15871573
void _visitPropertyFirst<T extends AstNode>(List<AstNode> nodes) {
15881574
// When loading from bytes, we read fields first.
15891575
// There is no particular reason for this - we just have to store

0 commit comments

Comments
 (0)