Index: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
index d037649d2b59ac136fe9cda8e90c9b0c8062c9a3..bf2926f60fbc11957f57ed982c2b99134296ec83 100644 |
--- a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
+++ b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java |
@@ -4,9 +4,10 @@ |
package com.google.dart.compiler.resolver; |
-import com.google.common.base.Joiner; |
import static com.google.dart.compiler.common.ErrorExpectation.errEx; |
+import com.google.common.base.Joiner; |
+ |
/** |
@@ -512,4 +513,15 @@ public class CompileTimeConstantTest extends ResolverTestCase { |
errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 19, 14), |
errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 3, 1, 39)); |
} |
+ |
+ public void testInvalidDefaultParameterWithFunction() { |
+ resolveAndTestCtConstExpectErrors( |
+ Joiner.on("\n").join( |
+ "class Object {}", |
+ "class Function {}", |
+ "qwerty() => () {};", |
+ "topLevel([var x = qwerty]) { x(); }", |
+ "main() { topLevel(); }"), |
+ errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 19, 6)); |
+ } |
} |