OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, 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 |
| 5 // test w/ `dart test/util/solo_test.dart whitespace_around_ops` |
| 6 |
| 7 |
| 8 // Define our own int so we don't need `int` in our mock SDK. |
| 9 class MyInt { |
| 10 MyInt operator -() => this; |
| 11 MyInt operator ~() => this; |
| 12 MyInt operator ~/(MyInt other) => this; |
| 13 MyInt operator /(MyInt other) => this; |
| 14 } |
| 15 |
| 16 void main() { |
| 17 MyInt f, g; |
| 18 print(f ~/ g); |
| 19 print(f~/ g); //LINT |
| 20 print(f ~/g); //LINT |
| 21 print(f~/g); //LINT |
| 22 print(f/ ~g); //LINT |
| 23 print(f /~g); //LINT |
| 24 print(f / ~g); //OK |
| 25 f =- g; //LINT |
| 26 f = -g; //OK |
| 27 } |
OLD | NEW |