I have an inline function calling on its turn a su...
# getting-started
e
I have an inline function calling on its turn a super inline function, but Idea warnings me
Accessing super members from public-API inline function is deprecated
why?
a
e
I don't get it, sorry
a
Can you please ask in the issue itself, so that the reason for deprecation is clearly documented in the issue tracker?
e
sure
👍 1
so Alexey, this did bite me just back at the end.. I need to call this:
Copy code
class Texture1d : Texture {
   inline fun <reified T> load(..): T =
I need
inline
+
reified
to comfortably pass down
T
, what possibilities do I have?
a
Sorry, can you please share a self-contained code sample and describe what the problem is?
e
sure, here you go, branch
super
as soon as you try to
build
, you'll get all the error about the super members
a
You can use the workaround described in https://youtrack.jetbrains.com/issue/KT-45379:
In order to get the similar behavior, the super call could be extracted to a separate function (having public visibility or internal visibility with @PublishedApi annotation).
e
I read that multiple times, but I couldn't figure it out how
so, this is my situation:
Copy code
inline fun <reified T> load(..): T = super.load<T>(..)
how can be this extracted exactly?
because if I try this:
Copy code
companion object {
    @JvmStatic
    inline fun <reified T> load(instance: Texture1d): T = instance.load<T>(Vec1i(), 0) 
}
problem persists
a
Hm, I’m not sure, maybe indeed there is no way. You could make the function internal and add some public non-inline overload I guess. You can create a YouTrack issue about it.
e
I'm afraid
@PublishedApi internal
can't help me
I have to write n methods for each single class..