Index: pkg/analyzer/test/generated/resolver_test.dart |
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart |
index c0e93f087417cf010f5f6916f9af88e568e9c344..52d59d2631eb9ea572edddadddcb50c037f61c71 100644 |
--- a/pkg/analyzer/test/generated/resolver_test.dart |
+++ b/pkg/analyzer/test/generated/resolver_test.dart |
@@ -12709,6 +12709,70 @@ class TypeOverrideManagerTest extends EngineTestCase { |
@reflectiveTest |
class TypePropagationTest extends ResolverTestCase { |
+ void fail_finalPropertyInducingVariable_classMember_instance() { |
+ addNamedSource( |
+ "/lib.dart", |
+ r''' |
+class A { |
+ final v = 0; |
+}'''); |
+ String code = r''' |
+import 'lib.dart'; |
+f(A a) { |
+ return a.v; // marker |
+}'''; |
+ _assertTypeOfMarkedExpression( |
+ code, typeProvider.dynamicType, typeProvider.intType); |
+ } |
+ |
+ void fail_finalPropertyInducingVariable_classMember_instance_inherited() { |
+ addNamedSource( |
+ "/lib.dart", |
+ r''' |
+class A { |
+ final v = 0; |
+}'''); |
+ String code = r''' |
+import 'lib.dart'; |
+class B extends A { |
+ m() { |
+ return v; // marker |
+ } |
+}'''; |
+ _assertTypeOfMarkedExpression( |
+ code, typeProvider.dynamicType, typeProvider.intType); |
+ } |
+ |
+ void fail_finalPropertyInducingVariable_classMember_instance_propagatedTarget() { |
+ addNamedSource( |
+ "/lib.dart", |
+ r''' |
+class A { |
+ final v = 0; |
+}'''); |
+ String code = r''' |
+import 'lib.dart'; |
+f(p) { |
+ if (p is A) { |
+ return p.v; // marker |
+ } |
+}'''; |
+ _assertTypeOfMarkedExpression( |
+ code, typeProvider.dynamicType, typeProvider.intType); |
+ } |
+ |
+ void fail_finalPropertyInducingVariable_classMember_instance_unprefixed() { |
+ String code = r''' |
+class A { |
+ final v = 0; |
+ m() { |
+ v; // marker |
+ } |
+}'''; |
+ _assertTypeOfMarkedExpression( |
+ code, typeProvider.dynamicType, typeProvider.intType); |
+ } |
+ |
void fail_finalPropertyInducingVariable_classMember_static() { |
addNamedSource( |
"/lib.dart", |
@@ -13031,70 +13095,6 @@ main(CanvasElement canvas) { |
expect(identifier.propagatedType.name, "CanvasRenderingContext2D"); |
} |
- void test_finalPropertyInducingVariable_classMember_instance() { |
- addNamedSource( |
- "/lib.dart", |
- r''' |
-class A { |
- final v = 0; |
-}'''); |
- String code = r''' |
-import 'lib.dart'; |
-f(A a) { |
- return a.v; // marker |
-}'''; |
- _assertTypeOfMarkedExpression( |
- code, typeProvider.dynamicType, typeProvider.intType); |
- } |
- |
- void test_finalPropertyInducingVariable_classMember_instance_inherited() { |
- addNamedSource( |
- "/lib.dart", |
- r''' |
-class A { |
- final v = 0; |
-}'''); |
- String code = r''' |
-import 'lib.dart'; |
-class B extends A { |
- m() { |
- return v; // marker |
- } |
-}'''; |
- _assertTypeOfMarkedExpression( |
- code, typeProvider.dynamicType, typeProvider.intType); |
- } |
- |
- void test_finalPropertyInducingVariable_classMember_instance_propagatedTarget() { |
- addNamedSource( |
- "/lib.dart", |
- r''' |
-class A { |
- final v = 0; |
-}'''); |
- String code = r''' |
-import 'lib.dart'; |
-f(p) { |
- if (p is A) { |
- return p.v; // marker |
- } |
-}'''; |
- _assertTypeOfMarkedExpression( |
- code, typeProvider.dynamicType, typeProvider.intType); |
- } |
- |
- void test_finalPropertyInducingVariable_classMember_instance_unprefixed() { |
- String code = r''' |
-class A { |
- final v = 0; |
- m() { |
- v; // marker |
- } |
-}'''; |
- _assertTypeOfMarkedExpression( |
- code, typeProvider.dynamicType, typeProvider.intType); |
- } |
- |
void test_forEach() { |
String code = r''' |
main() { |