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

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

Issue 2380863003: fix #27135 and fix #27449 strong mode does not use propagated types (Closed)
Patch Set: Created 4 years, 3 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 ef9b1ebfec45429bd0a2d35d532b9fe90d0cdd20..9013f2121b5871f8a4c578d7762c3a64a3b1ea90 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -497,7 +497,7 @@ void main() {
(/*info:DYNAMIC_INVOKE*/b2("hello"));
dynamic a1 = new B();
- (/*info:DYNAMIC_INVOKE*/a1./*info:UNDEFINED_GETTER*/x);
+ (/*info:DYNAMIC_INVOKE*/a1.x);
a1.toString();
(/*info:DYNAMIC_INVOKE*/a1.toString(42));
var toStringClosure = a1.toString;
@@ -659,13 +659,13 @@ void main() {
int x;
double y;
x = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f(3);
- x = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE, info:INVALID_ASSIGNMENT*/f.col(3.0);
+ x = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f.col(3.0);
y = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f(3);
y = /*info:DYNAMIC_CAST, info:DYNAMIC_INVOKE*/f.col(3.0);
/*info:DYNAMIC_INVOKE*/f(3.0);
// Through type propagation, we know f is actually a B, hence the
// hint.
- /*info:DYNAMIC_INVOKE*/f.col(/*info:ARGUMENT_TYPE_NOT_ASSIGNABLE*/3);
+ /*info:DYNAMIC_INVOKE*/f.col(3);
}
{
A f = new B();
@@ -677,10 +677,10 @@ void main() {
}
{
dynamic g = new B();
- /*info:DYNAMIC_INVOKE*/g.call(/*info:ARGUMENT_TYPE_NOT_ASSIGNABLE*/32.0);
+ /*info:DYNAMIC_INVOKE*/g.call(32.0);
/*info:DYNAMIC_INVOKE*/g.col(42.0);
/*info:DYNAMIC_INVOKE*/g.foo(42.0);
- /*info:DYNAMIC_INVOKE*/g./*info:UNDEFINED_GETTER*/x;
+ /*info:DYNAMIC_INVOKE*/g.x;
A f = new B();
/*info:DYNAMIC_INVOKE*/f.col(42.0);
/*info:DYNAMIC_INVOKE*/f.foo(42.0);
@@ -1404,9 +1404,9 @@ void main() {
left = /*error:INVALID_ASSIGNMENT*/right;
left = bot;
- right = /*info:INVALID_ASSIGNMENT,warning:DOWN_CAST_COMPOSITE*/top;
+ right = /*warning:DOWN_CAST_COMPOSITE*/top;
right = /*error:INVALID_ASSIGNMENT*/left;
- right = /*info:INVALID_ASSIGNMENT*/right;
+ right = right;
right = bot;
bot = /*warning:DOWN_CAST_COMPOSITE*/top;
« 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