Files
kotlin-fork/compiler/testData/ir/irText/firProblems/Modality.kt.txt
T
2024-02-16 10:19:38 +00:00

72 lines
1.3 KiB
Kotlin
Vendored

class Atom {
val candidateDescriptor: CallableDescriptor
field = candidateDescriptor
get
constructor(candidateDescriptor: CallableDescriptor) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
class KotlinResolutionCandidate {
val resolvedCall: Atom
field = resolvedCall
get
constructor(resolvedCall: Atom) /* primary */ {
super/*Any*/()
/* <init>() */
}
}
abstract class ResolutionPart {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
abstract fun KotlinResolutionCandidate.process(): String
}
interface Substitutable<out T : DeclarationDescriptorNonRoot> {
}
object Final : Modality {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
object Owner : ResolutionPart {
private constructor() /* primary */ {
super/*ResolutionPart*/()
/* <init>() */
}
override fun KotlinResolutionCandidate.process(): String {
val candidateDescriptor: CallableDescriptor = <this>.<get-resolvedCall>().<get-candidateDescriptor>()
when {
when {
candidateDescriptor is MemberDescriptor -> EQEQ(arg0 = candidateDescriptor /*as MemberDescriptor */.getModality(), arg1 = null).not()
else -> false
} -> { // BLOCK
return "OK"
}
}
return "FAIL"
}
}