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:
- Kotlin constructor calls.
- Calls to Kotlin package-level functions.
For example, this line in a Java source file referencing the Kotlin
// 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:
- If you navigate from a Kotlin source file.
- 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