Closed chrismyang closed 11 years ago
Ah, if I had to hazard as a guess as to what the parser is doing, it looks like it's evaluating (Nil) :+ "bar"
as parameter to the getOrElse
.
Hm, how 'bout that.
Pull request submitted.
They've actually made dot-less invocation an "optional language feature" in 2.10 now, so you aren't the only one to think it's unsafe. I try to avoid that style wherever possible, except with symbolic operators.
I think this is fixed now.
If you specify a kernel.classpath as a configuration, it ends up setting the entire kernel classpath to exactly what you set kernel.classpath to, instead of kernel.classpath + default.
The culprit appears to be this line, which looks quite reasonable but actually does not do what you want.
As a simple test case, try these two snippets in your REPL of choice (perhaps Scala Notebook itself, perhaps?):
while
Someone smarter and Scala-ier than me can probably explain to me why the extra dot causes the parser to do something different, but I am struck, once again, by the danger of using operator-style (i.e., dot-less) invocation of methods.