https://kotlinlang.org logo
#intellij
Title
# intellij
s

Sam

02/14/2023, 10:05 AM
Is there any way to make the
@sample
documentation links in the stdlib not be broken in IntelliJ? They show as clickable, but clicking them just shows an error.
plus one 4
k

Klitos Kyriacou

02/14/2023, 11:27 AM
How do you even get to that file? When I ctrl+click on "emptyList()" in my source file, it takes me to this line in CollectionsKt.class:
Copy code
public fun <T> emptyList(): kotlin.collections.List<T> { /* compiled code */ }
The only way I get to see documentation while using IntelliJ is by looking at kotlinlang.org in Chrome.
s

Sam

02/14/2023, 11:35 AM
In this case all I did was write
emptyList()
and then click on it, but I definitely have seen that not work in the past. C.f. https://kotlinlang.slack.com/archives/C0B8H786P/p1669208903960199?thread_ts=1669205543.114769&amp;cid=C0B8H786P
🙏 1
k

Klitos Kyriacou

02/14/2023, 11:47 AM
I too can see the sources only some of the time. If I click on "listOf" in
val x: List<Int> = listOf()
then it takes me to the class file, and it won't show me the source file whatever I do. However, if I add a parameter and click on "listOf" in
val x: List<Int> = listOf(1)
then it succeeds in taking me to the source file!
🤯 1
5 Views