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

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

Issue 1690423002: Any field formal parameter has DefaultFieldFormalParameterElementImpl. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/resynthesize.dart ('k') | no next file » | 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 9be69724e3d7e8156d2e9e018205d88f06c4442c..c1f45674a7a8611af5eb9e351603bff66a970aea 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -1121,6 +1121,22 @@ class E {
checkLibrary('class C { var x; C(this.x); }');
}
+ test_class_constructor_fieldFormal_named_noDefault() {
+ checkLibrary('class C { int x; C({this.x}); }');
+ }
+
+ test_class_constructor_fieldFormal_named_withDefault() {
+ checkLibrary('class C { int x; C({this.x: 42}); }');
+ }
+
+ test_class_constructor_fieldFormal_optional_noDefault() {
+ checkLibrary('class C { int x; C([this.x]); }');
+ }
+
+ test_class_constructor_fieldFormal_optional_withDefault() {
+ checkLibrary('class C { int x; C([this.x = 42]); }');
+ }
+
test_class_constructor_implicit() {
checkLibrary('class C {}');
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698