OLD | NEW |
(Empty) | |
| 1 40 columns | |
| 2 >>> single cascades on same line |
| 3 "foo"..toString(); |
| 4 <<< |
| 5 "foo"..toString(); |
| 6 >>> long single cascade forces multi-line |
| 7 "foo"..toString(argument, argument, argument); |
| 8 <<< |
| 9 "foo" |
| 10 ..toString( |
| 11 argument, argument, argument); |
| 12 >>> multiple cascades get the same line when the method names are the same |
| 13 list |
| 14 ..add("baz") |
| 15 ..add("bar"); |
| 16 <<< |
| 17 list..add("baz")..add("bar"); |
| 18 >>> cascades indent contained blocks (and force multi-line) multiple cascades ge
t their own line when method names are different |
| 19 foo..fooBar()..toString(); |
| 20 <<< |
| 21 foo |
| 22 ..fooBar() |
| 23 ..toString(); |
| 24 >>> cascaded setters are always multi-line even with the same name |
| 25 foo..baz = 3..baz=5; |
| 26 <<< |
| 27 foo |
| 28 ..baz = 3 |
| 29 ..baz = 5; |
| 30 >>> cascades indent contained blocks (and force multi-line) |
| 31 "foo"..toString(() {body;}); |
| 32 <<< |
| 33 "foo" |
| 34 ..toString(() { |
| 35 body; |
| 36 }); |
OLD | NEW |