Chromium Code Reviews| Index: pkg/analyzer/test/src/summary/resynthesize_common.dart |
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| index f5ce02425ac67b2ab1549814cd80f9624176266e..561a43011d7da77c9131bb3c11e04c4ac3ae7275 100644 |
| --- a/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| +++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart |
| @@ -440,6 +440,8 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest { |
| checkElidablePrefix(oTarget.prefix); |
| checkElidablePrefix(oTarget.identifier); |
| compareConstAsts(r, o.propertyName, desc); |
| + } else if (o is SuperExpression && r is SuperExpression) { |
| + // Nothing to compare. |
| } else if (o is ThisExpression && r is ThisExpression) { |
| // Nothing to compare. |
| } else if (o is NullLiteral) { |
| @@ -695,6 +697,10 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest { |
| // Validate modifiers. |
| for (Modifier modifier in Modifier.values) { |
| + // There is no way to know this by looking at declarations. |
| + if (modifier == Modifier.REFERENCES_SUPER) { |
|
Paul Berry
2017/01/29 14:28:02
We can't safely do this. The modifier REFERENCES_
scheglov
2017/01/29 18:05:15
Done.
|
| + continue; |
| + } |
| bool got = _hasModifier(resynthesized, modifier); |
| bool want = _hasModifier(original, modifier); |
| expect(got, want, |
| @@ -2362,6 +2368,12 @@ const vComplement = ~1; |
| '''); |
| } |
| + test_const_topLevel_super() { |
| + checkLibrary(r''' |
| +const vSuper = super; |
| +'''); |
| + } |
| + |
| test_const_topLevel_this() { |
| checkLibrary(r''' |
| const vThis = this; |
| @@ -4820,6 +4832,19 @@ typedef F();'''); |
| checkLibrary('f() {} g() {}'); |
| } |
| + test_unresolved_annotation_instanceCreation_argument_super() { |
| + checkLibrary( |
| + ''' |
| +class A { |
| + const A(_); |
| +} |
| + |
| +@A(super) |
| +class C {} |
| +''', |
| + allowErrors: true); |
| + } |
| + |
| test_unresolved_annotation_instanceCreation_argument_this() { |
| checkLibrary( |
| ''' |