While playing around with regexps in Scala I wrote something like this:
scala> val y = "Foo"
y: java.lang.String = Foo
scala> y "Bar"
scala>
As you can see, the second statement is just silently accepted. Is this legal a legal statement, and if so, what does it do? Or is it a bug in the parser and there should be an error message?