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

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

Issue 9689063: Visit Node in CompileTimeConstantAnalyzer only if Node based (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
index bf2926f60fbc11957f57ed982c2b99134296ec83..b18723dfb9201811dcc66dc79588b1670bc74e93 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/CompileTimeConstantTest.java
@@ -67,6 +67,18 @@ public class CompileTimeConstantTest extends ResolverTestCase {
ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_NUMBER,
ResolverErrorCode.EXPECTED_CONSTANT_EXPRESSION_NUMBER);
}
+
+ public void test_circularReference() {
+ resolveAndTestCtConstExpectErrors(
+ Joiner.on("\n").join(
+ "class Object {}",
+ "class A {",
+ " static final A = B;",
+ " static final B = A;",
+ "}"),
+ errEx(ResolverErrorCode.CIRCULAR_REFERENCE, 3, 20, 1),
+ errEx(ResolverErrorCode.CIRCULAR_REFERENCE, 4, 20, 1));
+ }
public void testConstantBinaryExpression12() {
// Multiple binary expressions
@@ -288,7 +300,6 @@ public class CompileTimeConstantTest extends ResolverTestCase {
}
public void testConstantConstructorAssign1() {
-
resolveAndTestCtConst(Joiner.on("\n").join(
"class Object {}",
"class A {",

Powered by Google App Engine
This is Rietveld 408576698