What's wrong with this interface declaration


#1

package somepackage

public interface Intf {
  fun a() : Long?
}

in Idea - “interface” keyword highlighted red as “unresolved reference: interface”

in compiler:

error:
Expecting a top level declaration

replacing “interface” with “trait” makes the code compilable

Kotlin plugin version: 0.11.91.AndroidStudio.4


#2

'trait' keyword was replaced with 'interface' only in Kotlin 0.12.+


#3

how can I upgrade the plugin to 0.12?

I use IDEA 13.1.6


#4

You have to upgrade your IntelliJ IDEA as well. New versions of the Kotlin plugin require IntelliJ IDEA 14.1.