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

Unified Diff: pkg/analyzer/test/src/summary/linker_test.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/linker_test.dart
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index 699811cdec2f2fca97f56d332c740f83c13a5ad1..3a768df283de28a18b9ecdf171ca1f6f85152420 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -338,7 +338,7 @@ var y = C.x;
''');
LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
expect(_getVariable(library.getContainedName('y')).inferredType.toString(),
- '(D) → dynamic');
+ '(D) → E');
}
void test_inferredType_implicitFunctionTypeIndices() {
@@ -525,11 +525,11 @@ class C {
addBundle('/a.ds', bundle);
createLinker('''
import 'a.dart';
-var x = new C().f; // Inferred type: dynamic
+var x = new C().f; // Inferred type: int
''');
LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
expect(_getVariable(library.getContainedName('x')).inferredType.toString(),
- 'dynamic');
+ 'int');
}
void test_inferredTypeFromOutsideBuildUnit_instanceField_toInstanceField() {
@@ -542,12 +542,12 @@ class C {
createLinker('''
import 'a.dart';
class D {
- var g = new C().f; // Inferred type: dynamic
+ var g = new C().f; // Inferred type: int
}
''');
LibraryElementForLink library = linker.getLibrary(linkerInputs.testDartUri);
ClassElementForLink_Class classD = library.getContainedName('D');
- expect(classD.fields[0].inferredType.toString(), 'dynamic');
+ expect(classD.fields[0].inferredType.toString(), 'int');
}
void test_inferredTypeFromOutsideBuildUnit_methodParamType_viaInheritance() {
« no previous file with comments | « pkg/analyzer/test/generated/hint_code_test.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698