I have the following code:
object testLines extends App {
val items = Array("""a-b-c d-e-f""","""a-b-c th-i-t""")
val lines = items.map(_.replaceAll("-", "")split("\t"))
print(lines.map(_.mkString(",")).mkString("\n"))
}
By mistake i did not put a dot between replaceAll and split but it worked.
By contrary when putting a dot between replaceAll and split i got an error
- identifier expected but ';' found.
- Implicit conversions found: items =>
What is going on? Why does it work without a dot but is not working with a dot.
Update: It works also with dot. The error message is a bug in the scala ide. The first part of the question is still valid
Thanks,
David