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

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

Issue 1855483003: Store initializer expressions for untyped vars/fields in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index dc8fd6d7f06efddcb450402dcba5449da3e48734..5d500d310fae350d1b8236c69c792bbc1a83fda9 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -2844,6 +2844,14 @@ class C {
}''');
}
+ test_field_static_final_untyped() {
+ checkLibrary('class C { static final x = 0; }');
+ }
+
+ test_field_untyped() {
+ checkLibrary('class C { var x = 0; }');
+ }
+
test_function_documented() {
checkLibrary('''
// Extra comment so doc comment offset != 0
@@ -4105,6 +4113,10 @@ var x;''');
checkLibrary('final int x = 0;');
}
+ test_variable_final_top_level_untyped() {
+ checkLibrary('final v = 0;');
+ }
+
test_variable_getterInLib_setterInPart() {
addSource('/a.dart', 'part of my.lib; void set x(int _) {}');
checkLibrary('library my.lib; part "a.dart"; int get x => 42;');
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698