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

Unified Diff: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java

Issue 10536211: Fix for issue 3541 and a small debugging improvement (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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: compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
===================================================================
--- compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java (revision 8877)
+++ compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java (working copy)
@@ -34,6 +34,17 @@
"}"));
}
+ public void test_nonConstArg() {
+ resolveAndTestCtConstExpectErrors(
+ Joiner.on("\n").join(
+ "class Object {}",
+ "class A { const A(s); }",
+ "main() {",
+ " var a = const A(new A(null));",
+ "}"),
+ errEx(ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION, 4, 19, 11));
+ }
+
/**
* <p>
* http://code.google.com/p/dart/issues/detail?id=1655
« no previous file with comments | « compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java ('k') | samples/tests/samples/samples.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698