[IR] Make IrMemberAccessExpression be IrDeclarationReference

This commit is contained in:
Roman Artemev
2019-10-08 18:16:37 +03:00
committed by romanart
parent eee594101a
commit bf367003f9
4 changed files with 14 additions and 11 deletions
@@ -16,14 +16,12 @@
package org.jetbrains.kotlin.ir.expressions
import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors
import org.jetbrains.kotlin.ir.symbols.*
interface IrCallableReference : IrMemberAccessExpression, IrDeclarationReference {
override val descriptor: CallableDescriptor
interface IrCallableReference : IrMemberAccessExpression {
}
interface IrFunctionReference : IrCallableReference {
@@ -10,18 +10,18 @@ import org.jetbrains.kotlin.ir.declarations.IrTypeParameter
import org.jetbrains.kotlin.ir.declarations.IrFunction
import org.jetbrains.kotlin.ir.declarations.IrValueParameter
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
import org.jetbrains.kotlin.ir.symbols.IrSymbol
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.types.defaultType
import org.jetbrains.kotlin.ir.types.toKotlinType
import org.jetbrains.kotlin.ir.util.dump
import org.jetbrains.kotlin.ir.util.render
import org.jetbrains.kotlin.types.KotlinType
interface IrMemberAccessExpression : IrExpression {
interface IrMemberAccessExpression : IrExpression, IrDeclarationReference {
var dispatchReceiver: IrExpression?
var extensionReceiver: IrExpression?
val descriptor: CallableDescriptor
override val descriptor: CallableDescriptor
override val symbol: IrSymbol
val origin: IrStatementOrigin?
val typeArgumentsCount: Int
@@ -66,7 +66,7 @@ val CallableDescriptor.typeParametersCount: Int
fun IrMemberAccessExpression.getTypeArgumentOrDefault(irTypeParameter: IrTypeParameter) =
getTypeArgument(irTypeParameter.index) ?: irTypeParameter.defaultType
interface IrFunctionAccessExpression : IrMemberAccessExpression, IrDeclarationReference {
interface IrFunctionAccessExpression : IrMemberAccessExpression {
override val descriptor: FunctionDescriptor
override val symbol: IrFunctionSymbol
}