gpt4 book ai didi

intellij-idea - Intellij 不会显示某些 kotlin 类的源代码

转载 作者:行者123 更新时间:2023-12-02 12:59:10 30 4
gpt4 key购买 nike

我在研究 Kotlin 时,在查看一些文档时偶然发现了一些问题。我看到有些类没有附上源代码。例如,似乎没有 SetsKt.class 的源代码/javadoc,尽管其他类有很多。这有什么具体原因吗?

亲切的问候,杰尔默 enter image description here

最佳答案

引自 jetbrains 问题:

The reason for this behaviour is that facade class files (like FilesKt.class) can be generated from several kotlin source files. So when you click on such a file it's not entirely obvious what you want to see. So we went with a conservative decision to show (admittedly ugly) decompiled code for such files, which contain all the declarations inside as opposed to showing some source file (which may not contain the declaration you're looking for). We can improve the behaviour so that when class file is generated from only one Kotlin file it takes you to that file directly but this will not necessarily help with more complex cases (such as kotlin-runtime) when single class file is generated from several source files.

关于intellij-idea - Intellij 不会显示某些 kotlin 类的源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51766445/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com