shared void run() {
switch (process.arguments.size)
case (0) { print("no arguments"); }
else if (process.arguments.first?.equals("foo") else false) { print("first argument is foo"); }
else if (process.arguments.first?.equals("bar") else false) { print("first argument is bar"); }
else { print("first argument is neither foo nor bar"); }
}
The formatter currently turns it into this:
shared void run() {
switch (process.arguments.size)
case (0) { print("no arguments"); }
else if (process.arguments.first?.equals("foo") else false) { print("first argument is foo"); } else if (process.arguments.first?.equals("bar") else false) { print("first argument is bar"); } else { print("first argument is neither foo nor bar"); }
}
(I also reject any responsibility for a delayed ceylon.formatter release if @gavinking thinks it’s a good idea to add new syntax two days before release without telling anyone. FFS.)
This is now allowed:
The formatter currently turns it into this:
(I also reject any responsibility for a delayed
ceylon.formatter
release if @gavinking thinks it’s a good idea to add new syntax two days before release without telling anyone. FFS.)