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

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

Issue 10558014: Use operator location for operator resolving problems (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/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 577832676a2d76a8b372c3f3e6cdae3df42c93d4..d492a5f37326dac234de52ef1678489a38f3e46f 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -2591,6 +2591,25 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
errEx(TypeErrorCode.INTERFACE_HAS_NO_METHOD_NAMED, 6, 5, 3));
}
+ public void test_operatorLocation() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ "}",
+ "main() {",
+ " A a = new A();",
+ " a + 0;",
+ " -a;",
+ " a--;",
+ "}",
+ "");
+ assertErrors(
+ libraryResult.getErrors(),
+ errEx(TypeErrorCode.INTERFACE_HAS_NO_METHOD_NAMED, 6, 5, 1),
+ errEx(TypeErrorCode.CANNOT_BE_RESOLVED, 7, 3, 1),
+ errEx(TypeErrorCode.CANNOT_BE_RESOLVED, 8, 4, 2));
+ }
+
private AnalyzeLibraryResult analyzeLibrary(String... lines) throws Exception {
return analyzeLibrary(getName(), makeCode(lines));
}

Powered by Google App Engine
This is Rietveld 408576698