Hey, I wondered if there may be something like an ...
# announcements
j
Hey, I wondered if there may be something like an annotation that can be added to a Java or Scala method to make it invisible for Kotlin but still visible for those languages.
n
in the end, it’s bytecode while each language creates its own flavor it would be very hard to tell from the bytecode from what language it’s generated
j
I actually found that
Copy code
@kotlin.Deprecated(message = "", level = kotlin.DeprecationLevel.HIDDEN)
public void doSomething() {}
does seem to work! The function can still be called from Java but not from Kotlin.
n
pretty sneaky 👍
j
It doesn't seem to work from Scala however, which was my ultimate goal 😞
s
Try submitting an issue with the feature request. Seems pretty nice to have
j