A certain combination of whitespace and ordering together with backticks in parameter names where the backticked name has the same leading chars as another param seems to mislead the compiler into producing compile errors:
The declaration
case class A(`abc def`: List[Int], abc: String)
leads to
[info] Compiling 7 Scala sources to ...
[error] (test:compileIncremental) scala.reflect.internal.Types$TypeError: type mismatch;
[error] found : List
[error] required: String
[error] Total time: 2 s, completed Feb 10, 2016 11:09:51 AM
This issue seem to depend on the ordering and the type of the parameters as well as the type of the declaration, because all of the following compile just fine:
case class A(abc: String, `abc def`: List[Int])
case class B(`abc def`: String, abc: String)
case class C(`bbc def`: List[Int], abc: String)
def x(`abc def`: List[Int], abc: String) = 42
Is this a bug or somehow expected?
Scala 2.11.7