smallshen
07/05/2025, 1:41 PMFILE: LibC.kt
public final typealias pid_t = R|kotlin/Long|
public abstract interface LibC : R|kotlin/Any| {
public abstract fun getpid(): R|{pid_t=} kotlin/Long|
public final companion object Companion : R|kotlin/Any| {
public final fun create(): R|kotlin/Unit|
private constructor(): R|LibC.Companion| {
super<R|kotlin/Any|>()
}
}
public final companion object Companion : R|kotlin/Any| {
public final val getpid: R|java/lang/foreign/MemorySegment|
public get(): R|java/lang/foreign/MemorySegment|
public final class Companion : R|kotlin/Any| {
public final val getpid: R|java/lang/foreign/FunctionDescriptor|
public get(): R|java/lang/foreign/FunctionDescriptor|
}
}
}
But when I tried to use statement LibC.Proc.getpid it errors NO_COMPANION_OBJECT what caused this error? (Proc is generated)
It seems like FirStandaloneQualifierChecker runs before nested FirDeclarationGenerationExtension , how could I fix it?dmitriy.novozhilov
07/07/2025, 1:28 PMinterface LibC {
companion object {
fun create() {}
}
companion object {
val getpid: MemorySegment
class Companion {
val getpid: FunctionDescriptor
}
}
}
I see there several problems:
1. there are duplicated companions
2. there is no LibC.Proc, so LibC.Proc.getpid is unresolved as expected
3. nested class Companion inside the second companion objects looks very suspicious
So the problem most likely in your implementation of FirDeclarationGenerationExtension.dmitriy.novozhilov
07/07/2025, 1:29 PM