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

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

Issue 2699053002: treat void as a top type, analyzer fix for #28763
Patch Set: Created 3 years, 10 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 fcd68a9f5ba4864873402b5bbad81adcd6d8475f..83905c60cb4e66b0b36d3f0d93dec872240259b3 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -3502,7 +3502,7 @@ class A {
void set d(y) => voidFn();
/*warning:NON_VOID_RETURN_FOR_SETTER*/int set e(y) => 4;
/*warning:NON_VOID_RETURN_FOR_SETTER*/int set f(y) =>
- /*error:RETURN_OF_INVALID_TYPE*/voidFn();
+ /*info:DOWN_CAST_IMPLICIT*/voidFn();
set g(y) {return /*error:RETURN_OF_INVALID_TYPE*/4;}
void set h(y) {return /*error:RETURN_OF_INVALID_TYPE*/4;}
/*warning:NON_VOID_RETURN_FOR_SETTER*/int set i(y) {return 4;}
@@ -4147,7 +4147,7 @@ class B extends A {
typedef int Foo();
void foo() {}
void main () {
- Foo x = /*error:INVALID_ASSIGNMENT,info:USE_OF_VOID_RESULT*/foo();
+ Foo x = /*warning:DOWN_CAST_COMPOSITE,info:USE_OF_VOID_RESULT*/foo();
}
''');
}
« no previous file with comments | « pkg/analyzer/test/generated/type_system_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