Different question: I'm trying to call a Publishe...
# general-advice
a
Different question: I'm trying to call a PublishedApi internal function from a lambda inside an inline function:
Copy code
interface IExtensibleSubtree {
  companion object {
    inline fun <reified T : Any> addField() = PropertyDelegateProvider<_, _> { thisRef, prop ->
       _addFieldInternal(T::class, ...other data)
    }

    @PublishedApi internal fun _addFieldInternal(...) = ...
  }
}
When I do this, I get this `IllegalAccessError`:
Copy code
class btpos.source.vdfdsl.types.spawners.TFBotSpawner$special$$inlined$addField$default$1 tried to access field btpos.source.vdfdsl.modeling.IExtensibleSubtree$Companion.$$INSTANCE     (btpos.source.vdfdsl.types.spawners.TFBotSpawner$special$$inlined$addField$default$1 and btpos.source.vdfdsl.modeling.IExtensibleSubtree$Companion are in unnamed module of loader 'app')
This seems like a bug, but has it been fixed in a later version? I don't want to migrate my whole project to a newer version just to find that it hasn't been fixed yet.