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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 10449038: Issue 3251. Fixes for node type (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index 8689b3399b64f71310c7807aea17e2cae3e22195..a16e2de184d0d2c949ba6e91050980f987a28bc7 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -813,7 +813,7 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
errEx(TypeErrorCode.FIELD_IS_FINAL, 7, 5, 1),
errEx(TypeErrorCode.FIELD_IS_FINAL, 8, 5, 1));
}
-
+
public void test_finalField_inInterface() throws Exception {
AnalyzeLibraryResult libraryResult = analyzeLibrary(
getName(),
@@ -1460,6 +1460,19 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
assertVariableTypeString(libraryResult, "v2", "bool");
}
+ public void test_getType_getterInSwitch() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "int get foo() {}",
+ "f() {",
+ " switch (true) {",
+ " default:",
+ " int v = foo;",
+ " }",
+ "}",
+ "");
+ assertErrors(libraryResult.getErrors());
+ }
+
/**
* Asserts that {@link VariableElement} with given name has expected type.
*/

Powered by Google App Engine
This is Rietveld 408576698