I thought they used to be marked as synthetic in the bytecode to prevent this, however, it seems to not (any longer ?) be the case. This is a big pain for us when building APIs in Kotlin
u
udalov
09/24/2020, 1:28 PM
They can’t be marked as synthetic since using them from Java sources in the same module should be OK.
I think we had an inspection for Java sources that highlighted internal members from other modules as red, but I don’t know if it affects completion. Might be worth reporting an issue about that.
m
mikehearn
09/24/2020, 2:41 PM
Mmmm. It doesn't help for non-IJ users. I'll file a ticket but I'd like to find an alternative solution.
l
louiscad
09/25/2020, 7:39 AM
Maybe they could be marked
@JvmSynthetic
for Kotlin-only modules?
u
udalov
09/25/2020, 11:19 AM
Synthetic leads to many issues, for example debuggers won’t step into synthetic methods by default, some code coverage tools will not track these methods, etc.