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

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

Issue 10542008: Issue 3224. Incorrect return type of negate operator should cause a static warning (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for message 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
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
index 7632ec104b4eb23eb9918c3c8908ed6edcaaeb68..7e3ae899f5571b0dec645b9cf1f38284aaa97986 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java
@@ -1133,7 +1133,6 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
" Foo foo;",
" bool b;",
" int i;",
- " Foo operator negate() { return this; }",
" Foo operator +(int operand) { return this; }",
" Foo operator -(int operand) { return this; }",
"}",
@@ -1152,7 +1151,6 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
"}",
"class X {",
" X x;",
- " Z operator negate() { return null; }",
" Z operator +(int operand) { return null; }",
" Z operator -(int operand) { return null; }",
"}",
@@ -1166,7 +1164,7 @@ public class TypeAnalyzerTest extends TypeAnalyzerTestCase {
ClassElement qux = source.get("Qux");
ClassElement y = source.get("Y");
ClassElement z = source.get("Z");
- for (Token op : EnumSet.of(Token.DEC, Token.INC, Token.SUB)) {
+ for (Token op : EnumSet.of(Token.DEC, Token.INC)) {
analyzeIn(foo, String.format("%sfoo", op), 0);
analyzeIn(foo, String.format("i = %sfoo", op), 1);
analyzeIn(bar, String.format("%sbar", op), 1);
« no previous file with comments | « compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698