Index: dart/pkg/dartdoc/mirrors/dart2js_mirror.dart |
diff --git a/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart b/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart |
index 444a0e16212aa97b4c8f5bb7768c30b430f42bf5..b7a7d6c7c577ae2d2a3366484a7648a34e148dfa 100644 |
--- a/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart |
+++ b/dart/pkg/dartdoc/mirrors/dart2js_mirror.dart |
@@ -125,7 +125,6 @@ String _getOperatorFromOperatorName(String name) { |
Map<String, String> mapping = const { |
'eq': '==', |
'not': '~', |
- 'negate': 'negate', // Will change. |
'index': '[]', |
'indexSet': '[]=', |
'mul': '*', |
@@ -1244,6 +1243,12 @@ class Dart2JsMethodMirror extends Dart2JsElementMirror |
_kind = Dart2JsMethodKind.FACTORY; |
// canonical name is TypeName.constructorName |
_canonicalName = '$_name.$_constructorName'; |
+ } else if (_name == 'negate') { |
+ _operatorName = _name; |
+ _name = 'operator'; |
+ _kind = Dart2JsMethodKind.OPERATOR; |
+ // canonical name is 'operator operatorName' |
+ _canonicalName = 'operator $_operatorName'; |
} else if (_name.startsWith('operator\$')) { |
String str = _name.substring(9); |
_name = 'operator'; |