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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 1906413004: Fix missing downwards inference on fields, report more inference (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 6ddbcafc7c03a3f7a56aea9e2d4165d8eaa42d3c..9a7b128a5e556098782b417bbecdbd6b4cad6da8 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -1686,10 +1686,10 @@ void main() {
l = <int>[i, /*info:DOWN_CAST_IMPLICIT*/n, /*warning:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/s];
}
{
- List l = [i];
- l = [s];
- l = [n];
- l = [i, n, s];
+ List l = /*info:INFERRED_TYPE_LITERAL*/[i];
+ l = /*info:INFERRED_TYPE_LITERAL*/[s];
+ l = /*info:INFERRED_TYPE_LITERAL*/[n];
+ l = /*info:INFERRED_TYPE_LITERAL*/[i, n, s];
}
{
Map<String, int> m = <String, int>{s: i};
@@ -1702,13 +1702,15 @@ void main() {
// TODO(leafp): We can't currently test for key errors since the
// error marker binds to the entire entry.
{
- Map m = {s: i};
- m = {s: s};
- m = {s: n};
- m = {s: i,
+ Map m = /*info:INFERRED_TYPE_LITERAL*/{s: i};
+ m = /*info:INFERRED_TYPE_LITERAL*/{s: s};
+ m = /*info:INFERRED_TYPE_LITERAL*/{s: n};
+ m = /*info:INFERRED_TYPE_LITERAL*/
+ {s: i,
s: n,
s: s};
- m = {i: s,
+ m = /*info:INFERRED_TYPE_LITERAL*/
+ {i: s,
n: s,
s: s};
}
« no previous file with comments | « pkg/analyzer/test/generated/strong_mode_test.dart ('k') | pkg/analyzer/test/src/task/strong/inferred_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698