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

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

Issue 10536164: Issue 3550. Initial understanding "const". (Closed) Base URL: https://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/ResolverTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
index 3aec6960b4d90413162688a9ea06c07f7e9dda0e..f8f5ea617111ca4d5bab70ed536e9fc50b474621 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverTest.java
@@ -1173,6 +1173,16 @@ public class ResolverTest extends ResolverTestCase {
errEx(ResolverErrorCode.STATIC_FINAL_REQUIRES_VALUE, 9, 16, 2),
errEx(ResolverErrorCode.CONSTANTS_MUST_BE_INITIALIZED, 12, 11, 2));
}
+
+ public void test_const_requiresValue() {
+ resolveAndTest(Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class Object {}",
+ "interface int {}",
+ "const f;",
+ ""),
+ errEx(ResolverErrorCode.CONST_REQUIRES_VALUE, 4, 7, 1));
+ }
public void testNoGetterOrSetter() {
resolveAndTest(Joiner.on("\n").join(

Powered by Google App Engine
This is Rietveld 408576698