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 590affc97374d1090d30fc04bed1baa267947b26..c732bcb579422c61967d4b6e1e8e124fa76dd9d8 100644 |
--- a/pkg/analyzer/test/generated/resolver_test.dart |
+++ b/pkg/analyzer/test/generated/resolver_test.dart |
@@ -12703,70 +12703,6 @@ 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", |
@@ -13089,6 +13025,70 @@ 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() { |