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

Unified Diff: pkg/analyzer/test/generated/resolver_test.dart

Issue 2288223003: Don't perform final fields and top-level variables type propagation. (Closed)
Patch Set: Rewrite 'reuse' tests using 'inferredTypeSlot'. Created 4 years, 4 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/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 5d025fff0ab9641ba4a351baed233ce6417bd230..cd87a6fd01c74b2e2b5ab981b1e3653a130674d8 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -1481,109 +1481,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_finalPropertyInducingVariable_classMember_static() {
- addNamedSource(
- "/lib.dart",
- r'''
-class A {
- static final V = 0;
-}''');
- String code = r'''
-import 'lib.dart';
-f() {
- return A.V; // marker
-}''';
- assertTypeOfMarkedExpression(
- code, typeProvider.dynamicType, typeProvider.intType);
- }
-
- void test_finalPropertyInducingVariable_topLevelVariable_prefixed() {
- addNamedSource("/lib.dart", "final V = 0;");
- String code = r'''
-import 'lib.dart' as p;
-f() {
- var v2 = p.V; // marker prefixed
-}''';
- assertTypeOfMarkedExpression(
- code, typeProvider.dynamicType, typeProvider.intType);
- }
-
- void test_finalPropertyInducingVariable_topLevelVariable_simple() {
- addNamedSource("/lib.dart", "final V = 0;");
- String code = r'''
-import 'lib.dart';
-f() {
- return V; // marker simple
-}''';
- assertTypeOfMarkedExpression(
- code, typeProvider.dynamicType, typeProvider.intType);
- }
-
void test_forEach() {
String code = r'''
main() {
« no previous file with comments | « pkg/analyzer/test/generated/incremental_resolver_test.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698