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

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

Issue 2983293002: Remove toplevel inference restriction hints, and restore as much (Closed)
Patch Set: Keep error filter Created 3 years, 5 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/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 8e6533e6b46117bf13eeccb710d6e5c73f7f1be7..f51f0f572aead0008aaf8ddead4fdaf0e4c323f6 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -1144,8 +1144,8 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
} else if (resynthesized is BottomTypeImpl && original is BottomTypeImpl) {
expect(resynthesized, same(original));
} else if (resynthesized.runtimeType != original.runtimeType) {
- fail('Type mismatch: expected ${original.runtimeType},'
- ' got ${resynthesized.runtimeType} ($desc)');
+ fail('Type mismatch: expected $original,'
+ ' got $resynthesized ($desc)');
} else {
fail('Unimplemented comparison for ${original.runtimeType}');
}
@@ -3686,7 +3686,7 @@ const int v = 'abc'.
''');
} else {
checkElementText(library, r'''
-const dynamic v/*error: instanceGetter*/ = 'abc'.
+const int v = 'abc'.
length/*location: dart:core;String;length?*/;
''');
}
@@ -3714,7 +3714,7 @@ const int v =
} else {
checkElementText(library, r'''
const String S = 'abc';
-const dynamic v/*error: instanceGetter*/ =
+const int v =
S/*location: test.dart;S?*/.
length/*location: dart:core;String;length?*/;
''');
@@ -3740,7 +3740,7 @@ const v = S.length;
if (isStrongMode) {
checkElementText(library, r'''
import 'a.dart';
-const dynamic v/*error: instanceGetter*/ =
+const int v =
S/*location: a.dart;S?*/.
length/*location: dart:core;String;length?*/;
''');
@@ -3765,7 +3765,7 @@ const v = p.S.length;
if (isStrongMode) {
checkElementText(library, r'''
import 'a.dart' as p;
-const dynamic v/*error: instanceGetter*/ =
+const int v =
p/*location: test.dart;p*/.
S/*location: a.dart;S?*/.
length/*location: dart:core;String;length?*/;
@@ -4921,7 +4921,7 @@ enum E {
}
final E vValue;
final List<E> vValues;
-final dynamic vIndex/*error: instanceGetter*/;
+final int vIndex;
''');
} else {
checkElementText(library, r'''
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_ast_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