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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 3008453002: Build / resynthesize final fields as ConstFieldElementImpl only if the enclosing class has a consta… (Closed)
Patch Set: Created 3 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/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 590a1ece09df6b9e22de3768fdd5e02a2d890ca3..b1d87056d25a93134598041a5739209547a528f1 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -3793,16 +3793,14 @@ class C {
checkElementText(library, r'''
typedef dynamic F();
class C {
- final List<F> f = const <
- F/*location: test.dart;F*/>[];
+ final List<F> f;
}
''');
} else {
checkElementText(library, r'''
typedef dynamic F();
class C {
- final dynamic f = const <
- F/*location: test.dart;F*/>[];
+ final dynamic f;
}
''');
}
@@ -3893,15 +3891,13 @@ class C<T> {
if (isStrongMode) {
checkElementText(library, r'''
class C<T> {
- final List<T> f = const <
- T/*location: test.dart;C;T*/>[];
+ final List<T> f;
}
''');
} else {
checkElementText(library, r'''
class C<T> {
- final dynamic f = const <
- T/*location: test.dart;C;T*/>[];
+ final dynamic f;
}
''');
}
@@ -5721,16 +5717,14 @@ class C {
checkElementText(library, r'''
import 'a.dart';
class C {
- final double b =
- a/*location: a.dart;a?*/ / 2;
+ final double b;
}
''');
} else {
checkElementText(library, r'''
import 'a.dart';
class C {
- final dynamic b =
- a/*location: a.dart;a?*/ / 2;
+ final dynamic b;
}
''');
}
@@ -5749,8 +5743,7 @@ class C {
library lib;
part 'a.dart';
class C {
- final double b =
- a/*location: test.dart;a.dart;a?*/ / 2;
+ final double b;
}
--------------------
unit: a.dart
@@ -5762,8 +5755,7 @@ final int a;
library lib;
part 'a.dart';
class C {
- final dynamic b =
- a/*location: test.dart;a.dart;a?*/ / 2;
+ final dynamic b;
}
--------------------
unit: a.dart
@@ -5781,13 +5773,13 @@ class C {
if (isStrongMode) {
checkElementText(library, r'''
class C {
- final int x = 0;
+ final int x;
}
''');
} else {
checkElementText(library, r'''
class C {
- final dynamic x = 0;
+ final dynamic x;
}
''');
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698