Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java |
=================================================================== |
--- compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java (revision 8336) |
+++ compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java (working copy) |
@@ -1737,7 +1737,7 @@ |
public void test_getType_binaryExpression() throws Exception { |
AnalyzeLibraryResult libraryResult = analyzeLibrary( |
- "f() {", |
+ "f(var arg) {", |
" var v1 = 1 + 2;", |
" var v2 = 1 - 2;", |
" var v3 = 1 * 2;", |
@@ -1754,6 +1754,7 @@ |
" var v14 = 1 / 2.0;", |
" var v15 = 1.0 ~/ 2.0;", |
" var v16 = 1.0 ~/ 2;", |
+ " var v17 = arg as int", |
"}", |
""); |
assertInferredElementTypeString(libraryResult, "v1", "int"); |
@@ -1772,6 +1773,7 @@ |
assertInferredElementTypeString(libraryResult, "v14", "double"); |
assertInferredElementTypeString(libraryResult, "v15", "double"); |
assertInferredElementTypeString(libraryResult, "v16", "double"); |
+ assertInferredElementTypeString(libraryResult, "v17", "int"); |
} |
/** |