| Index: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| index 1528a11f6b0109fdba4b29e68d201d4eaba47418..28ebdb486e6366ebd4334f13acbc513117972c64 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| @@ -2046,14 +2046,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
|
|
| }
|
| }
|
| - // operator "negate" should return numeric type
|
| - if (modifiers.isOperator() && methodElement.getName().equals("-")
|
| - && methodElement.getParameters().isEmpty() && returnTypeNode != null) {
|
| - Type returnType = node.getElement().getFunctionType().getReturnType();
|
| - if (!types.isSubtype(returnType, numType)) {
|
| - typeError(returnTypeNode, TypeErrorCode.OPERATOR_NEGATE_NUM_RETURN_TYPE);
|
| - }
|
| - }
|
| // operator "[]=" should return void
|
| if (modifiers.isOperator() && methodElement.getName().equals("[]=")
|
| && returnTypeNode != null) {
|
|
|