Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 2c22f0d

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Don't set isFinal for synthetic properties in ElementBuilder, set isStatic.
Similar to https://dart-review.googlesource.com/c/sdk/+/201780 Change-Id: Ie82aae2ae88a6947ef57a73aae76a99a2bae85e1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202162 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent a25d211 commit 2c22f0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,6 @@ class ElementBuilder extends ThrowingAstVisitor<void> {
956956
if (property == null) {
957957
var variable = TopLevelVariableElementImpl(name, -1);
958958
variable.isSynthetic = true;
959-
variable.isFinal = accessorElement.isGetter;
960959
_enclosingContext.addTopLevelVariable(name, variable);
961960
property = variable;
962961
}
@@ -967,7 +966,7 @@ class ElementBuilder extends ThrowingAstVisitor<void> {
967966
if (property == null) {
968967
var field = FieldElementImpl(name, -1);
969968
field.isSynthetic = true;
970-
field.isFinal = accessorElement.isGetter;
969+
field.isStatic = accessorElement.isStatic;
971970
_enclosingContext.addField(name, field);
972971
property = field;
973972
}

0 commit comments

Comments
 (0)