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

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

Issue 2738223002: Reland "Turn the DOWN_CAST_COMPOSITE strong mode error into a hint, which will" (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « pkg/analyzer/test/src/task/strong/checker_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/strong/inferred_type_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index 90f77b187b8da15dcdaf0c55eb7445d1a5652391..de02780bbba226ee62bcaca0b77a5cc55b90c708 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -450,7 +450,7 @@ var f = /*info:INFERRED_TYPE_CLOSURE,warning:UNSAFE_BLOCK_CLOSURE_INFERENCE*/()
test1() {
List<int> o;
var y = o.map(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/(x) { });
- Iterable<int> z = /*warning:DOWN_CAST_COMPOSITE*/y;
+ Iterable<int> z = /*info:DOWN_CAST_COMPOSITE*/y;
}
''');
var f = mainUnit.functions[0].localVariables[1];
@@ -1776,7 +1776,7 @@ void main() {
$downwards<int> t5 = f.then(/*info:INFERRED_TYPE_CLOSURE,error:INVALID_CAST_FUNCTION_EXPR*/
(x) => x ? 2 : new $upwards<int>.value(3));
$downwards<int> t6 = f.then(/*info:INFERRED_TYPE_CLOSURE*/
- (x) {return /*warning:DOWN_CAST_COMPOSITE*/x ? 2 : new $upwards<int>.value(3);});
+ (x) {return /*info:DOWN_CAST_COMPOSITE*/x ? 2 : new $upwards<int>.value(3);});
}
''';
await checkFileElement(
@@ -1814,7 +1814,7 @@ void main() {
$downwards<int> t5 = f.then(/*info:INFERRED_TYPE_CLOSURE*/
(x) => x ? 2 : new $upwards<int>.value(3));
$downwards<int> t6 = f.then(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/
- (x) {return /*warning:DOWN_CAST_COMPOSITE*/x ? 2 : new $upwards<int>.value(3);});
+ (x) {return /*info:DOWN_CAST_COMPOSITE*/x ? 2 : new $upwards<int>.value(3);});
}
''';
await checkFileElement(
« no previous file with comments | « pkg/analyzer/test/src/task/strong/checker_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698