Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 2757143002: The parameter of synthetic setters should inherit 'covariant'. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 6ba50b52c6479e35e54bbc1532eeb3ec2665f0c5..909e0b558947a0a820f9033b6562b54177e2dc10 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -7717,6 +7717,7 @@ final v = 42 is num;
expect(variable.isStatic, isFalse);
expect(variable.isFinal, isFalse);
expect(variable.initializer, isNull);
+ expect(variable.inheritsCovariantSlot, isNot(0));
expect(findExecutable('i', executables: cls.executables), isNull);
expect(findExecutable('i=', executables: cls.executables), isNull);
expect(unlinkedUnits[0].publicNamespace.names, hasLength(1));
@@ -7728,6 +7729,7 @@ final v = 42 is num;
UnlinkedVariable variable =
serializeClassText('class C { static const int i = 0; }').fields[0];
expect(variable.isConst, isTrue);
+ expect(variable.inheritsCovariantSlot, 0);
assertUnlinkedConst(variable.initializer.bodyExpr,
operators: [UnlinkedExprOperation.pushInt], ints: [0]);
}
@@ -7750,6 +7752,7 @@ class C {
UnlinkedVariable variable =
serializeClassText('class C { final int i = 0; }').fields[0];
expect(variable.isFinal, isTrue);
+ expect(variable.inheritsCovariantSlot, 0);
assertUnlinkedConst(variable.initializer.bodyExpr,
operators: [UnlinkedExprOperation.pushInt], ints: [0]);
}
@@ -7871,6 +7874,7 @@ class C<T> {
serializeClassText('class C { static int i; }').fields[0];
expect(variable.isStatic, isTrue);
expect(variable.initializer, isNull);
+ expect(variable.inheritsCovariantSlot, 0);
expect(unlinkedUnits[0].publicNamespace.names, hasLength(1));
expect(unlinkedUnits[0].publicNamespace.names[0].name, 'C');
expect(unlinkedUnits[0].publicNamespace.names[0].members, hasLength(1));
@@ -7890,18 +7894,21 @@ class C<T> {
expect(variable.isStatic, isTrue);
expect(variable.isFinal, isTrue);
expect(variable.initializer.bodyExpr, isNull);
+ expect(variable.inheritsCovariantSlot, 0);
}
test_field_static_final_untyped() {
UnlinkedVariable variable =
serializeClassText('class C { static final x = 0; }').fields[0];
expect(variable.initializer.bodyExpr, isNotNull);
+ expect(variable.inheritsCovariantSlot, 0);
}
test_field_untyped() {
UnlinkedVariable variable =
serializeClassText('class C { var x = 0; }').fields[0];
expect(variable.initializer.bodyExpr, isNotNull);
+ expect(variable.inheritsCovariantSlot, isNot(0));
}
test_fully_linked_references_follow_other_references() {
« no previous file with comments | « pkg/analyzer/test/generated/strong_mode_driver_test.dart ('k') | pkg/analyzer/test/src/summary/top_level_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698