Skip to content

Commit 85e5c56

Browse files
scheglovCommit Queue
authored andcommitted
DeCo. Remove a few isSynthetic references in tests.
For removed _assertNonSyntheticElementSelf invocations, the element cannot be anything else than from a declaration, there is no isOriginX to check. Change-Id: I0df9b881c98ec329c9c2d14fb6c078fe7c5d0303 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465961 Reviewed-by: Paul Berry <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 13507d2 commit 85e5c56

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

pkg/analyzer/test/src/summary/element_text.dart

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,6 @@ class _Element2Writer extends _AbstractElementWriter {
329329
expect(flags.where((flag) => flag).length, 1);
330330
}
331331

332-
void _assertNonSyntheticElementSelf(Element element) {
333-
expect(element.isSynthetic, isFalse);
334-
expect(element.nonSynthetic, same(element));
335-
}
336-
337332
void _writeConstantInitializerExpression(String name, Expression expression) {
338333
if (_idMap.existingExpressionId(expression) case var id?) {
339334
_sink.writelnWithIndent('$name: $id');
@@ -1176,8 +1171,6 @@ class _Element2Writer extends _AbstractElementWriter {
11761171
_writeElementList('setters', e, e.setters, _writeSetterElement);
11771172
_writeElementList('methods', e, e.methods, _writeMethodElement);
11781173
});
1179-
1180-
_assertNonSyntheticElementSelf(e);
11811174
}
11821175

11831176
void _writeInstanceFragment(InstanceFragmentImpl f) {
@@ -1699,8 +1692,6 @@ class _Element2Writer extends _AbstractElementWriter {
16991692
// _writeAugmentationTarget(e);
17001693
// _writeAugmentation(e);
17011694
});
1702-
1703-
_assertNonSyntheticElementSelf(e);
17041695
}
17051696

17061697
void _writeTopLevelFunctionFragment(TopLevelFunctionFragmentImpl f) {
@@ -1906,8 +1897,6 @@ class _Element2Writer extends _AbstractElementWriter {
19061897
// _writeAugmentationTarget(e);
19071898
// _writeAugmentation(e);
19081899
});
1909-
1910-
_assertNonSyntheticElementSelf(e);
19111900
}
19121901

19131902
void _writeTypeAliasFragment(TypeAliasFragmentImpl f) {
@@ -1985,8 +1974,6 @@ class _Element2Writer extends _AbstractElementWriter {
19851974

19861975
_writeMetadata(e.metadata);
19871976
});
1988-
1989-
_assertNonSyntheticElementSelf(e);
19901977
}
19911978

19921979
void _writeTypeParameterFragment(TypeParameterFragmentImpl f) {

pkg/analyzer/test/src/summary/resolved_ast_printer.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2125,7 +2125,6 @@ Expected parent: (${parent.runtimeType}) $parent
21252125
_sink.writeIf(element.isPrivate, ' isPrivate');
21262126
_sink.writeIf(element.isPublic, ' isPublic');
21272127
_sink.writeIf(element.isStatic, ' isStatic');
2128-
_sink.writeIf(element.isSynthetic, ' isSynthetic');
21292128
}
21302129

21312130
static void _assertHasIdenticalElement<T>(List<T> elements, T expected) {

0 commit comments

Comments
 (0)