Files
kotlin-fork/compiler/testData/ir/irText/firProblems/Modality.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

72 lines
1.3 KiB
Plaintext
Vendored

interface Substitutable<out T : DeclarationDescriptorNonRoot> {
}
abstract class ResolutionPart {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
abstract fun KotlinResolutionCandidate.process(): String
}
class KotlinResolutionCandidate {
constructor(resolvedCall: Atom) /* primary */ {
super/*Any*/()
/* <init>() */
}
val resolvedCall: Atom
field = resolvedCall
get
}
class Atom {
constructor(candidateDescriptor: CallableDescriptor) /* primary */ {
super/*Any*/()
/* <init>() */
}
val candidateDescriptor: CallableDescriptor
field = candidateDescriptor
get
}
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"
}
}
object Final : Modality {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}