FIR: get rid of FirUnitType in default setters
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ import org.jetbrains.kotlin.fir.expressions.FirBody
|
||||
import org.jetbrains.kotlin.fir.transformInplace
|
||||
import org.jetbrains.kotlin.fir.transformSingle
|
||||
import org.jetbrains.kotlin.fir.types.FirType
|
||||
import org.jetbrains.kotlin.fir.types.impl.FirUnitType
|
||||
import org.jetbrains.kotlin.fir.types.impl.FirImplicitUnitType
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
|
||||
abstract class FirDefaultPropertyAccessor(
|
||||
@@ -57,7 +57,7 @@ class FirDefaultPropertySetter(
|
||||
) : FirDefaultPropertyAccessor(session, psi, isGetter = false) {
|
||||
override val valueParameters = mutableListOf(FirDefaultSetterValueParameter(session, psi, propertyType))
|
||||
|
||||
override var returnType: FirType = FirUnitType(session, psi)
|
||||
override var returnType: FirType = FirImplicitUnitType(session, psi)
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
valueParameters.transformInplace(transformer, data)
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-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.fir.types.impl
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotationCall
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinTypeProjection
|
||||
import org.jetbrains.kotlin.fir.types.FirResolvedType
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
sealed class FirBuiltinType(
|
||||
final override val session: FirSession,
|
||||
final override val psi: PsiElement?,
|
||||
val name: String
|
||||
) : FirResolvedType {
|
||||
final override val type: ConeKotlinType = ConeClassTypeImpl(
|
||||
FirClassSymbol(
|
||||
ClassId(
|
||||
KOTLIN_PACKAGE_FQ_NAME,
|
||||
Name.identifier(name)
|
||||
)
|
||||
),
|
||||
ConeKotlinTypeProjection.EMPTY_ARRAY
|
||||
)
|
||||
|
||||
final override val isNullable = false
|
||||
|
||||
final override val annotations: List<FirAnnotationCall>
|
||||
get() = emptyList()
|
||||
|
||||
companion object {
|
||||
private val KOTLIN_PACKAGE_FQ_NAME = FqName.topLevel(Name.identifier("kotlin"))
|
||||
}
|
||||
}
|
||||
|
||||
class FirUnitType(
|
||||
session: FirSession,
|
||||
psi: PsiElement?
|
||||
) : FirBuiltinType(session, psi, "Unit")
|
||||
@@ -22,7 +22,7 @@ FILE: simpleClass.kt
|
||||
|
||||
public? final? lateinit property fau(var): Double
|
||||
public? get(): Double
|
||||
public? set(value: Double): R|kotlin/Unit|
|
||||
public? set(value: Double): kotlin.Unit
|
||||
|
||||
}
|
||||
public? final inline class InlineClass {
|
||||
|
||||
Reference in New Issue
Block a user