Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
|
ahe
2012/04/13 13:02:15
Add description?
floitsch
2012/04/13 13:14:02
Done.
| |
| 5 class A { | |
| 6 operator negate() => this; | |
| 7 toString() => "5"; | |
| 8 abs() => "correct"; | |
| 9 } | |
| 10 | |
| 11 foo(a) => -(-a); | |
| 12 | |
| 13 main() { | |
| 14 Expect.equals("correct", foo(new A()).abs()); | |
| 15 } | |
| OLD | NEW |