All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl.kt Maven / Gradle / Ivy

/*
 * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
 * 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.expressions.impl

import org.jetbrains.kotlin.descriptors.ValueDescriptor
import org.jetbrains.kotlin.ir.expressions.IrGetValue
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor

class IrGetValueImpl(
    startOffset: Int,
    endOffset: Int,
    type: IrType,
    symbol: IrValueSymbol,
    override val origin: IrStatementOrigin? = null
) :
    IrTerminalDeclarationReferenceBase(
        startOffset,
        endOffset,
        type,
        symbol,
        symbol.descriptor
    ),
    IrGetValue {

    constructor(
        startOffset: Int,
        endOffset: Int,
        symbol: IrValueSymbol,
        origin: IrStatementOrigin? = null
    ) : this(startOffset, endOffset, symbol.owner.type, symbol, origin)

    override fun  accept(visitor: IrElementVisitor, data: D): R =
        visitor.visitGetValue(this, data)

    override fun copy(): IrGetValue =
        IrGetValueImpl(startOffset, endOffset, type, symbol, origin)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy