Opening Kotlin Standard Library in IntelliJ 13 CE


#1

Hey guys,

I want to make some simple contributions to the standard library project. However, I’m encountering is a few compile errors when opening the standard library project in IntelliJ.  Here’s my setup:

IntelliJ 13, v 133.162, Kotlin Plugin, 0.6.1561

Here is the error I'm getting,

StringsJVM.kt, line 150   Kotlin: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type java.nio.charset.Charset?

and that error is repeated 4 other times in different parts of the source.  This error makes me think something might be amiss with KAnnotator setup: Maybe Charset isn't properly annotated?  Or maybe I'm not loading the annotation XML files properly?  Or maybe this is just an error in the library that no one else has noticed? (seems unlikely)

My inexperience with Kotlin and IntelliJ (and pretty much all the build infrastucture (Gradle, maven etcc…)) in hindering my ability to debug…

thoughts?
-Andrew


#2

Looks like you don't have external annotations configured for your JDK. Could you have a look under Project Structure/SDKs?


#3

Indeed!  The problem, I believe, is that I had the annotations from IntelliJ 12 loaded.  I removed those annotations and then added the latest from IntelliJ 13; now the only compile errors are of my own invention ;-)