Minor. Replace TraitImpl -> DefaultImpls, Trait -> Interface
There are still a lot of trait word entries in the source code, only some of them got replaced here
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package org.jetbrains.kotlin.backend.common
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.backend.common.bridges.findTraitImplementation
|
||||
import org.jetbrains.kotlin.backend.common.bridges.findInterfaceImplementation
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
@@ -105,7 +105,7 @@ object CodegenUtil {
|
||||
for (declaration in DescriptorUtils.getAllDescriptors(descriptor.defaultType.memberScope)) {
|
||||
if (declaration !is CallableMemberDescriptor) continue
|
||||
|
||||
val traitMember = findTraitImplementation(declaration)
|
||||
val traitMember = findInterfaceImplementation(declaration)
|
||||
if (traitMember == null || Visibilities.isPrivate(traitMember.visibility)) continue
|
||||
|
||||
assert(traitMember.modality !== Modality.ABSTRACT) { "Cannot delegate to abstract trait method: $declaration" }
|
||||
|
||||
@@ -65,7 +65,7 @@ class DescriptorBasedFunctionHandle(
|
||||
|
||||
override val isDeclaration: Boolean =
|
||||
descriptor.kind.isReal ||
|
||||
findTraitImplementation(descriptor) != null
|
||||
findInterfaceImplementation(descriptor) != null
|
||||
|
||||
override val isAbstract: Boolean =
|
||||
descriptor.modality == Modality.ABSTRACT ||
|
||||
@@ -88,7 +88,7 @@ class DescriptorBasedFunctionHandle(
|
||||
* trait implementation should be generated into the class containing the fake override; or null if the given function is not a fake
|
||||
* override of any trait implementation or such method was already generated into the superclass or is a method from Any.
|
||||
*/
|
||||
fun findTraitImplementation(descriptor: CallableMemberDescriptor): CallableMemberDescriptor? {
|
||||
fun findInterfaceImplementation(descriptor: CallableMemberDescriptor): CallableMemberDescriptor? {
|
||||
if (descriptor.kind.isReal) return null
|
||||
if (isOrOverridesSynthesized(descriptor)) return null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user