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

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

Issue 15763006: Issue 10091. Type literal is a constant. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 4c3d01e9cb0c8154576a6d7292df56b98e290c55..9bc5cf855691d57593e05ea7774a69b3b76fb662 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
@@ -1181,6 +1181,22 @@ public class NonErrorResolverTest extends ResolverTestCase {
verify(source);
}
+ public void test_nonConstCaseExpression() throws Exception {
+ Source source = addSource(createSource(//
+ "f(Type t) {",
+ " switch (t) {",
+ " case bool:",
+ " case int:",
+ " return true;",
+ " default:",
+ " return false;",
+ " }",
+ "}"));
+ resolve(source);
+ assertNoErrors();
+ verify(source);
+ }
+
public void test_nonConstMapAsExpressionStatement_const() throws Exception {
Source source = addSource(createSource(//
"f() {",

Powered by Google App Engine
This is Rietveld 408576698