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

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

Issue 1531233002: Compute all default values of parameters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/non_error_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
index 17e9c8a194c1f20b637b09c6b847716681fead2a..d416a5e0a16b42d9e0f9eecc95e69de0fdc33f21 100644
--- a/pkg/analyzer/test/generated/non_error_resolver_test.dart
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -3925,6 +3925,28 @@ class A {
verify([source]);
}
+ void test_nonConstantDefaultValue_is_constField() {
+ Source source = addSource(r'''
+f([a = double.INFINITY]) {
+}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
+ void test_nonConstantDefaultValue_is_constTypeList() {
+ Source source = addSource(r'''
+class A {
+ m([p111 = const <String>[]]) {}
+}
+class B extends A {
+ m([p222 = const <String>[]]) {}
+}''');
+ computeLibrarySourceErrors(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
void test_nonConstantDefaultValue_method_named() {
Source source = addSource(r'''
class A {

Powered by Google App Engine
This is Rietveld 408576698