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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java

Issue 22926002: Report DEFAULT_VALUE_IN_FUNCTION_TYPE_PARAMETER. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
index 8dc41807dd8060808a2ad30c25a3cc01d81a6680..b39eeb00e32f30c455a4a041852de5a8416bce72 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/NonErrorResolverTest.java
@@ -544,6 +544,22 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_defaultValueInFunctionTypedParameter_named() throws Exception {
+ Source source = addSource(createSource(//
+ "f(g({p})) {}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
+ public void test_defaultValueInFunctionTypedParameter_optional() throws Exception {
+ Source source = addSource(createSource(//
+ "f(g([p])) {}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_duplicateDefinition_emptyName() throws Exception {
// Note: This code has two FunctionElements '() {}' with an empty name, this tests that the
// empty string is not put into the scope (more than once).

Powered by Google App Engine
This is Rietveld 408576698