IR: IrValueSymbol.owner: IrValueDeclaration

This commit is contained in:
Dmitry Petrov
2018-05-07 17:26:35 +03:00
parent 1592aa499f
commit d83849eec5
4 changed files with 22 additions and 9 deletions
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.ValueDescriptor
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.KotlinType
interface IrValueDeclaration : IrDeclaration, IrSymbolOwner {
override val descriptor: ValueDescriptor
override val symbol: IrValueSymbol
val name: Name
val type: KotlinType
}
@@ -20,18 +20,15 @@ import org.jetbrains.kotlin.descriptors.ParameterDescriptor
import org.jetbrains.kotlin.ir.expressions.IrExpressionBody
import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.KotlinType
interface IrValueParameter : IrSymbolDeclaration<IrValueParameterSymbol> {
interface IrValueParameter : IrValueDeclaration, IrSymbolDeclaration<IrValueParameterSymbol> {
override val declarationKind: IrDeclarationKind
get() = IrDeclarationKind.VALUE_PARAMETER
override val descriptor: ParameterDescriptor
val name: Name
val index: Int
val type: KotlinType
val varargElementType: KotlinType?
val isCrossinline: Boolean
val isNoinline: Boolean
@@ -19,14 +19,10 @@ package org.jetbrains.kotlin.ir.declarations
import org.jetbrains.kotlin.descriptors.VariableDescriptor
import org.jetbrains.kotlin.ir.expressions.IrExpression
import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.KotlinType
interface IrVariable : IrSymbolDeclaration<IrVariableSymbol> {
interface IrVariable : IrValueDeclaration, IrSymbolDeclaration<IrVariableSymbol> {
override val descriptor: VariableDescriptor
val name: Name
val type: KotlinType
val isVar: Boolean
val isConst: Boolean
val isLateinit: Boolean
@@ -54,6 +54,7 @@ interface IrTypeParameterSymbol : IrClassifierSymbol, IrBindableSymbol<TypeParam
interface IrValueSymbol : IrSymbol {
override val descriptor: ValueDescriptor
override val owner: IrValueDeclaration
}
interface IrValueParameterSymbol : IrValueSymbol, IrBindableSymbol<ParameterDescriptor, IrValueParameter>