Cannot resolve symbol -> or +

Hi,

I'm working with Intellij 12.1.4 Community edition for Mac.  I installed the latest Scala plugin 0.19.298. I'm using scala 2.10.2.

All the "->" symbols are highlighted red, also + when used in string concatenation:

This compiles:
val a = 1 + 2

This doesn't:
val a = "1" + "2"


This also doesn't work - "->" is highlighted:
Map("a" -> "b")

I can compile the code using the console...

How can I fix it in Intellij?

Thanks.


2 comments
Comment actions Permalink

I solved it. My JDK was configured incorrectly. I don't know exactly what it was, because it was listed in the dependencies of the project and seemed to be correct. But I downloaded a JDK, and added it like described here:

http://www.jetbrains.com/idea/documentation/migration_faq.html

"A: In the Project Settings dialog.
To add a JDK to project, press Ctrl+Alt+Shift+S, under Platform Settings click JDKs and specify JDK path. After that, you can click Project and specify which of JDK you have configured is used in the current projects. Remember that JDKs are configured at IDE level, so when you create another project, you won't need to add the same JDK again."

Now it works.

0
Comment actions Permalink

We are planning significantly improve begginers experience in IDEA 13 and such case also should be fixed by showing information popup, that JDK is not configured properly.

Best regards,
Aleksandr Podkaliuzin.

0

Please sign in to leave a comment.