Problems navigating to Kotlin declarations from Java source files


When I attempt to navigate to Kotlin library source code definitions
from a Java source file using the IDEA Goto Declaration (Ctrl+B)
command I am taken to an “IntelliJ API Decompiler stub source
generated from a class file” instead of the Kotlin source code in the
source JAR. This happens navigating from the following entities:

  1. Kotlin constructor calls.
  2. Calls to Kotlin package-level functions.

For example, this line in a Java source file referencing the Kotlin
IntRange class:

// Java
IntRange range = new IntRange(1, 10);
   ^                     ^
   |                     |
Ctrl+B works          Ctrl+B fails (goes to stub)

The code compiles and executes without error.

The navigation problems do not occur:

  1. If you navigate from a Kotlin source file.
  2. Or if you navigate from Java to Kotlin entities defined in the
    same project i.e. the problems seem to be confined to external
    library source JARs.


IntelliJ IDEA 2017.1.5
Build #IC-171.4694.70, built on July 4, 2017
JRE: 1.8.0_112-release-736-b21 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-89-generic

Kotlin plugin 1.1.3-release-IJ2017.1-2


CORRECTION: 2. Calls to Kotlin package-level functions. in original post

Should read:

  1. Calls to overloaded Kotlin functions annotated with @JvmOverloads that have optional arguments omitted.