I wonder, why can't I compile this one:
class MyClass{
override def toString = "123:" + if (true) "456" else "789"
//error: illegal start of simple expression
}
Try this:
override def toString = "123:" + (if (true) "456" else "789")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With