question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`KSDeclaration` in different module does not have the correct modifiers

See original GitHub issue

I 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:open
  • Created 2 years ago
  • Reactions:6
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Jeffsetcommented, Jun 8, 2022

It seems we need to systematically address modifier divergence between source-based and descriptor-based impls. I think, no difference should exist between those.

0reactions
neetopiacommented, Jun 13, 2022

I will add some comments to the API document to reflect this, thanks for the input.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found