`KSDeclaration` in different module does not have the correct modifiers
See original GitHub issueI have a class that I want to process and create a metadata class based on the field types. This class has an enum field. The enum declaration is located in a different gradle module. The problem is that the KSDeclaration
of this enum does not contain the ENUM
modifier (It has only the following modifiers: PUBLIC
, FINAL
). If I move the enum class into the same gradle module then the KSDeclarartion
will have the correct modifiers. Is there some sort of limitation with multi-module projects or is it a bug?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Proposal: The internal modifier for classes · Issue #5228
The idea is that modules in the same directory can access the class member as if it was public, but it is private...
Read more >Chapter 7. Packages and Modules - Oracle Help Center
It is a compile-time error if a top level type declaration contains any one of the following access modifiers: protected , private ,...
Read more >Package protected alternative in Kotlin - visibility
Save this question. Show activity on this post. In Java, we have the package protected (default) modifier for classes, which allows us to...
Read more >Module Statement - Visual Basic | Microsoft Learn
Rules · Modifiers. All module members are implicitly Shared. · Inheritance. A module cannot inherit from any type other than Object, from which ......
Read more >Visibility modifiers | Kotlin
The protected modifier is not available for top-level declarations. note. To use a visible top-level declaration from another package, you ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems we need to systematically address modifier divergence between source-based and descriptor-based impls. I think, no difference should exist between those.
I will add some comments to the API document to reflect this, thanks for the input.