I want to generate a hidden (from Kotlin callers) ...
# compiler
a
I want to generate a hidden (from Kotlin callers) constructor. On the JVM I'd like it to be synthetic and on other platforms it could be deprecated with HIDDEN warning I suppose. What's my options generating such a constructor? Should I just add
@JvmSynthetic
and the
@Deprecated
annotations?
Looks like adding
JvmSynthetic
works at least. Nice
e
The doc says:
Synthetic targets become inaccessible for Java sources at compile time while still being accessible for Kotlin sources.
Are you sure it’s working because of
JvmSynthetic
? Isn’t it because of the
@Deprecated
? (asking out of curiosity — I have this use case too)
a
I haven't added
@Deprecated
yet so it couldn't be it
I'm having trouble adding the deprecated in fact because I don't know how to set the level, trying to figure out how to get an
IrExpression
for the level