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

Unified Diff: pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart

Issue 2943273002: Implement type inference of getters/setters based on inheritance. (Closed)
Patch Set: Created 3 years, 6 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/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
diff --git a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
similarity index 61%
copy from pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
copy to pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
index 2374e76f44f36b87a2f587189dcc555194a956ef..ff914322fcfe350782a8f27a3fb5ecd29d4d3b8c 100644
--- a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
+++ b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
@@ -5,12 +5,18 @@
/*@testedFeatures=inference*/
library test;
-class C extends D {
- set foo(x) {}
+class A implements B {
+ get /*@topType=int*/ x => f();
}
-class D {
- int foo;
+abstract class B implements C {
+ get /*@topType=int*/ x;
}
+abstract class C {
+ int get x;
+}
+
+dynamic f() => null;
+
main() {}

Powered by Google App Engine
This is Rietveld 408576698