Chromium Code Reviews| Index: pkg/analyzer/test/src/summary/resynthesize_test.dart |
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
| index 9d90ee7061e184e12ab6e6957a9037ff74935ba6..e5719a7e2664c33c2e2d1b2909efc0680529e3ed 100644 |
| --- a/pkg/analyzer/test/src/summary/resynthesize_test.dart |
| +++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart |
| @@ -236,7 +236,6 @@ class ResynthTest extends ResolverTestCase { |
| expect(r, isNull, reason: desc); |
| } else { |
| expect(r, isNotNull, reason: desc); |
| - compareTypes(r.staticType, o.staticType, desc); |
|
Paul Berry
2016/02/01 20:48:47
Why is it ok to delete this check?
scheglov
2016/02/01 20:52:45
By the same reason why we did this for SimpleIdent
|
| if (o is ParenthesizedExpression) { |
| // We don't resynthesize parenthesis, so just ignore it. |
| compareConstantExpressions(r, o.expression, desc); |
| @@ -1054,6 +1053,46 @@ const V = p.C.F; |
| '''); |
| } |
| + test_const_reference_staticMethod() { |
| + shouldCompareConstValues = true; |
| + checkLibrary(r''' |
| +class C { |
| + static int m(int a, String b) => 42; |
| +} |
| +const V = C.m; |
| +'''); |
| + } |
| + |
| + test_const_reference_staticMethod_imported() { |
| + shouldCompareConstValues = true; |
| + addLibrarySource( |
| + '/a.dart', |
| + r''' |
| +class C { |
| + static int m(int a, String b) => 42; |
| +} |
| +'''); |
| + checkLibrary(r''' |
| +import 'a.dart'; |
| +const V = C.m; |
| +'''); |
| + } |
| + |
| + test_const_reference_staticMethod_imported_withPrefix() { |
| + shouldCompareConstValues = true; |
| + addLibrarySource( |
| + '/a.dart', |
| + r''' |
| +class C { |
| + static int m(int a, String b) => 42; |
| +} |
| +'''); |
| + checkLibrary(r''' |
| +import 'a.dart' as p; |
| +const V = p.C.m; |
| +'''); |
| + } |
| + |
| test_const_reference_topLevelVariable() { |
| shouldCompareConstValues = true; |
| checkLibrary(r''' |