[FIR] Introduce valueClassRepresentation to FIR

#KT-1179
This commit is contained in:
Evgeniy.Zhelenskiy
2022-03-14 16:33:05 +03:00
committed by teamcity
parent 28bf83ceac
commit b6f2513dd2
16 changed files with 131 additions and 33 deletions
@@ -0,0 +1,24 @@
/*
* Copyright 2010-2022 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.fir.declarations
import org.jetbrains.kotlin.descriptors.InlineClassRepresentation
import org.jetbrains.kotlin.descriptors.MultiFieldValueClassRepresentation
import org.jetbrains.kotlin.descriptors.ValueClassRepresentation
import org.jetbrains.kotlin.fir.types.ConeSimpleKotlinType
private object FirValueClassRepresentationKey : FirDeclarationDataKey()
var FirRegularClass.valueClassRepresentation: ValueClassRepresentation<ConeSimpleKotlinType>?
by FirDeclarationDataRegistry.data(FirValueClassRepresentationKey)
val FirRegularClass.inlineClassRepresentation: InlineClassRepresentation<ConeSimpleKotlinType>?
get() = valueClassRepresentation as? InlineClassRepresentation<ConeSimpleKotlinType>
val FirRegularClass.multiFieldValueClassRepresentation: MultiFieldValueClassRepresentation<ConeSimpleKotlinType>?
get() = valueClassRepresentation as? MultiFieldValueClassRepresentation<ConeSimpleKotlinType>