| Index: dart/tests/language/operator_negate_and_method_negate_test.dart
|
| diff --git a/dart/tests/compiler/dart2js_extra/regress/4562_test.dart b/dart/tests/language/operator_negate_and_method_negate_test.dart
|
| similarity index 51%
|
| copy from dart/tests/compiler/dart2js_extra/regress/4562_test.dart
|
| copy to dart/tests/language/operator_negate_and_method_negate_test.dart
|
| index 13a30edc8c3407cf7ed64d28819af3d7d6149172..83a19e42c5b55803ba8722de8059363948b135b4 100644
|
| --- a/dart/tests/compiler/dart2js_extra/regress/4562_test.dart
|
| +++ b/dart/tests/language/operator_negate_and_method_negate_test.dart
|
| @@ -2,15 +2,15 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -void main() {
|
| - var foo = new Foo();
|
| - var bar = new Bar(); /// 01: compile-time error
|
| -}
|
| +// This checks that it is possible to have a method named negate as
|
| +// well as unary- operator.
|
|
|
| class Foo {
|
| - factory Foo() => null;
|
| + operator-() => 42;
|
| + negate() => 87;
|
| }
|
|
|
| -class Bar extends Foo {
|
| - Bar(); /// 01: continued
|
| +main() {
|
| + Expect.equals(42, -new Foo());
|
| + Expect.equals(87, new Foo().negate());
|
| }
|
|
|