FIR: introduce status & status transformer (no override resolve)
So #KT-24021 Fixed
This commit is contained in:
@@ -68,15 +68,6 @@ class RawFirBuilder(val session: FirSession) {
|
||||
}
|
||||
}
|
||||
|
||||
private val KtDeclaration.platformStatus: FirMemberPlatformStatus
|
||||
get() {
|
||||
return when {
|
||||
hasExpectModifier() -> FirMemberPlatformStatus.EXPECT
|
||||
hasActualModifier() -> FirMemberPlatformStatus.ACTUAL
|
||||
else -> FirMemberPlatformStatus.DEFAULT
|
||||
}
|
||||
}
|
||||
|
||||
private inner class Visitor : KtVisitor<FirElement, Unit>() {
|
||||
private inline fun <reified R : FirElement> KtElement?.convertSafe(): R? =
|
||||
this?.accept(this@Visitor, Unit) as? R
|
||||
@@ -111,9 +102,9 @@ class RawFirBuilder(val session: FirSession) {
|
||||
): FirPropertyAccessor {
|
||||
if (this == null) {
|
||||
return if (isGetter) {
|
||||
FirDefaultPropertyGetter(session, property, propertyType)
|
||||
FirDefaultPropertyGetter(session, property, propertyType, property.visibility)
|
||||
} else {
|
||||
FirDefaultPropertySetter(session, property, propertyType)
|
||||
FirDefaultPropertySetter(session, property, propertyType, property.visibility)
|
||||
}
|
||||
}
|
||||
val firAccessor = FirPropertyAccessorImpl(
|
||||
@@ -164,7 +155,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
nameAsSafeName,
|
||||
visibility,
|
||||
modality,
|
||||
platformStatus,
|
||||
hasExpectModifier(),
|
||||
hasActualModifier(),
|
||||
isOverride = hasModifier(KtTokens.OVERRIDE_KEYWORD),
|
||||
isConst = false,
|
||||
isLateInit = false,
|
||||
@@ -172,8 +164,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
returnType = type,
|
||||
isVar = isMutable,
|
||||
initializer = null,
|
||||
getter = FirDefaultPropertyGetter(session, this, type),
|
||||
setter = FirDefaultPropertySetter(session, this, type),
|
||||
getter = FirDefaultPropertyGetter(session, this, type, visibility),
|
||||
setter = FirDefaultPropertySetter(session, this, type, visibility),
|
||||
delegate = null
|
||||
)
|
||||
extractAnnotationsTo(firProperty)
|
||||
@@ -269,7 +261,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
session,
|
||||
this ?: owner,
|
||||
this?.visibility ?: Visibilities.UNKNOWN,
|
||||
this?.platformStatus ?: FirMemberPlatformStatus.DEFAULT,
|
||||
this?.hasExpectModifier() ?: false,
|
||||
this?.hasActualModifier() ?: false,
|
||||
delegatedSelfType,
|
||||
firDelegatedCall
|
||||
)
|
||||
@@ -362,7 +355,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
classOrObject.nameAsSafeName,
|
||||
classOrObject.visibility,
|
||||
classOrObject.modality,
|
||||
classOrObject.platformStatus,
|
||||
classOrObject.hasExpectModifier(),
|
||||
classOrObject.hasActualModifier(),
|
||||
classKind,
|
||||
isInner = classOrObject.hasModifier(KtTokens.INNER_KEYWORD),
|
||||
isCompanion = (classOrObject as? KtObjectDeclaration)?.isCompanion() == true,
|
||||
@@ -402,7 +396,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
FirTypeAliasSymbol(currentClassId),
|
||||
typeAlias.nameAsSafeName,
|
||||
typeAlias.visibility,
|
||||
typeAlias.platformStatus,
|
||||
typeAlias.hasExpectModifier(),
|
||||
typeAlias.hasActualModifier(),
|
||||
typeAlias.getTypeReference().toFirOrErrorType()
|
||||
)
|
||||
typeAlias.extractAnnotationsTo(firTypeAlias)
|
||||
@@ -424,7 +419,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
function.nameAsSafeName,
|
||||
function.visibility,
|
||||
function.modality,
|
||||
function.platformStatus,
|
||||
function.hasExpectModifier(),
|
||||
function.hasActualModifier(),
|
||||
function.hasModifier(KtTokens.OVERRIDE_KEYWORD),
|
||||
function.hasModifier(KtTokens.OPERATOR_KEYWORD),
|
||||
function.hasModifier(KtTokens.INFIX_KEYWORD),
|
||||
@@ -456,7 +452,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
session,
|
||||
this,
|
||||
visibility,
|
||||
platformStatus,
|
||||
hasExpectModifier(),
|
||||
hasActualModifier(),
|
||||
delegatedSelfType,
|
||||
getDelegationCall().convert(delegatedSuperType, delegatedSelfType, hasPrimaryConstructor),
|
||||
buildFirBody()
|
||||
@@ -503,7 +500,8 @@ class RawFirBuilder(val session: FirSession) {
|
||||
property.nameAsSafeName,
|
||||
property.visibility,
|
||||
property.modality,
|
||||
property.platformStatus,
|
||||
property.hasExpectModifier(),
|
||||
property.hasActualModifier(),
|
||||
property.hasModifier(KtTokens.OVERRIDE_KEYWORD),
|
||||
property.hasModifier(KtTokens.CONST_KEYWORD),
|
||||
property.hasModifier(KtTokens.LATEINIT_KEYWORD),
|
||||
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
* 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.fir.resolve.transformers
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.visitors.CompositeTransformResult
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
import org.jetbrains.kotlin.fir.visitors.compose
|
||||
|
||||
class FirStatusResolveTransformer : FirTransformer<Nothing?>() {
|
||||
override fun <E : FirElement> transformElement(element: E, data: Nothing?): CompositeTransformResult<E> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return (element.transformChildren(this, data) as E).compose()
|
||||
}
|
||||
|
||||
private val declarationsWithStatuses = mutableListOf<FirDeclaration>()
|
||||
|
||||
private val classes = mutableListOf<FirClass>()
|
||||
|
||||
private fun FirDeclaration.resolveVisibility(): Visibility {
|
||||
if (this is FirConstructor) {
|
||||
val klass = classes.lastOrNull()
|
||||
if (klass != null && (klass.classKind == ClassKind.ENUM_CLASS || klass.modality == Modality.SEALED)) {
|
||||
return Visibilities.PRIVATE
|
||||
}
|
||||
}
|
||||
return Visibilities.PUBLIC // TODO (overrides)
|
||||
}
|
||||
|
||||
private fun FirDeclaration.resolveModality(): Modality {
|
||||
return when (this) {
|
||||
is FirEnumEntry -> Modality.FINAL
|
||||
is FirClass -> if (classKind == ClassKind.INTERFACE) Modality.ABSTRACT else Modality.FINAL
|
||||
is FirCallableMember -> {
|
||||
val containingClass = classes.lastOrNull()
|
||||
when {
|
||||
containingClass == null -> Modality.FINAL
|
||||
containingClass.classKind == ClassKind.INTERFACE -> {
|
||||
when {
|
||||
visibility == Visibilities.PRIVATE ->
|
||||
Modality.FINAL
|
||||
this is FirNamedFunction && body == null ->
|
||||
Modality.ABSTRACT
|
||||
this is FirProperty && initializer == null && getter.body == null && setter.body == null ->
|
||||
Modality.ABSTRACT
|
||||
else ->
|
||||
Modality.OPEN
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
if (isOverride && containingClass.modality != Modality.FINAL) Modality.OPEN else Modality.FINAL
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> Modality.FINAL
|
||||
}
|
||||
}
|
||||
|
||||
override fun transformDeclarationStatus(
|
||||
declarationStatus: FirDeclarationStatus,
|
||||
data: Nothing?
|
||||
): CompositeTransformResult<FirDeclarationStatus> {
|
||||
if (declarationStatus.visibility == Visibilities.UNKNOWN || declarationStatus.modality == null) {
|
||||
val declaration = declarationsWithStatuses.last()
|
||||
val visibility = when (declarationStatus.visibility) {
|
||||
Visibilities.UNKNOWN -> declaration.resolveVisibility()
|
||||
else -> declarationStatus.visibility
|
||||
}
|
||||
val modality = declarationStatus.modality ?: declaration.resolveModality()
|
||||
val resolvedStatus = (declarationStatus as FirDeclarationStatusImpl).resolved(visibility, modality)
|
||||
return resolvedStatus.compose()
|
||||
}
|
||||
|
||||
return super.transformDeclarationStatus(declarationStatus, data)
|
||||
}
|
||||
|
||||
private inline fun storeDeclaration(
|
||||
declaration: FirDeclaration,
|
||||
computeResult: () -> CompositeTransformResult<FirDeclaration>
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
declarationsWithStatuses += declaration
|
||||
val result = computeResult()
|
||||
declarationsWithStatuses.removeAt(declarationsWithStatuses.lastIndex)
|
||||
return result
|
||||
}
|
||||
|
||||
private inline fun storeClass(
|
||||
klass: FirClass,
|
||||
computeResult: () -> CompositeTransformResult<FirDeclaration>
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
classes += klass
|
||||
val result = computeResult()
|
||||
classes.removeAt(classes.lastIndex)
|
||||
return result
|
||||
}
|
||||
|
||||
override fun transformClass(klass: FirClass, data: Nothing?): CompositeTransformResult<FirDeclaration> {
|
||||
return storeClass(klass) {
|
||||
super.transformClass(klass, data)
|
||||
}
|
||||
}
|
||||
|
||||
override fun transformMemberDeclaration(
|
||||
memberDeclaration: FirMemberDeclaration,
|
||||
data: Nothing?
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
return storeDeclaration(memberDeclaration) {
|
||||
super.transformMemberDeclaration(memberDeclaration, data)
|
||||
}
|
||||
}
|
||||
|
||||
override fun transformPropertyAccessor(
|
||||
propertyAccessor: FirPropertyAccessor,
|
||||
data: Nothing?
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
return storeDeclaration(propertyAccessor) {
|
||||
super.transformPropertyAccessor(propertyAccessor, data)
|
||||
}
|
||||
}
|
||||
|
||||
override fun transformConstructor(
|
||||
constructor: FirConstructor,
|
||||
data: Nothing?
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
return storeDeclaration(constructor) {
|
||||
super.transformConstructor(constructor, data)
|
||||
}
|
||||
}
|
||||
|
||||
override fun transformNamedFunction(
|
||||
namedFunction: FirNamedFunction,
|
||||
data: Nothing?
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
return storeDeclaration(namedFunction) {
|
||||
super.transformNamedFunction(namedFunction, data)
|
||||
}
|
||||
}
|
||||
|
||||
override fun transformProperty(
|
||||
property: FirProperty,
|
||||
data: Nothing?
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
return storeDeclaration(property) {
|
||||
super.transformProperty(property, data)
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -12,7 +12,8 @@ class FirTotalResolveTransformer {
|
||||
|
||||
private val transformers: List<FirTransformer<Nothing?>> = listOf(
|
||||
FirImportResolveTransformer(),
|
||||
FirTypeResolveTransformer()
|
||||
FirTypeResolveTransformer(),
|
||||
FirStatusResolveTransformer()
|
||||
)
|
||||
|
||||
fun processFile(firFile: FirFile) {
|
||||
|
||||
@@ -124,14 +124,6 @@ class FirRenderer(builder: StringBuilder) : FirVisitorVoid() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun FirMemberPlatformStatus.asString(): String {
|
||||
return when (this) {
|
||||
FirMemberPlatformStatus.DEFAULT -> ""
|
||||
FirMemberPlatformStatus.EXPECT -> "expect "
|
||||
FirMemberPlatformStatus.ACTUAL -> "actual "
|
||||
}
|
||||
}
|
||||
|
||||
override fun visitMemberDeclaration(memberDeclaration: FirMemberDeclaration) {
|
||||
memberDeclaration.annotations.renderAnnotations()
|
||||
if (memberDeclaration.typeParameters.isNotEmpty()) {
|
||||
@@ -140,7 +132,12 @@ class FirRenderer(builder: StringBuilder) : FirVisitorVoid() {
|
||||
print("> ")
|
||||
}
|
||||
print(memberDeclaration.visibility.asString() + " " + memberDeclaration.modalityAsString() + " ")
|
||||
print(memberDeclaration.platformStatus.asString())
|
||||
if (memberDeclaration.isExpect) {
|
||||
print("expect ")
|
||||
}
|
||||
if (memberDeclaration.isActual) {
|
||||
print("actual ")
|
||||
}
|
||||
if (memberDeclaration is FirCallableMember && memberDeclaration.isOverride) {
|
||||
print("override ")
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
|
||||
// Good name needed (something with receiver, type parameters, return type, and name)
|
||||
interface FirCallableMember : @VisitedSupertype FirDeclaration, FirMemberDeclaration, FirTypedDeclaration {
|
||||
val isOverride: Boolean
|
||||
val isOverride: Boolean get() = status.isOverride
|
||||
|
||||
val receiverType: FirType?
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ interface FirClass : FirDeclarationContainer, FirMemberDeclaration, FirSymbolOwn
|
||||
|
||||
val classKind: ClassKind
|
||||
|
||||
val isInner: Boolean
|
||||
val isInner: Boolean get() = status.isInner
|
||||
|
||||
val isCompanion: Boolean
|
||||
val isCompanion: Boolean get() = status.isCompanion
|
||||
|
||||
val isData: Boolean
|
||||
val isData: Boolean get() = status.isData
|
||||
|
||||
val isInline: Boolean
|
||||
val isInline: Boolean get() = status.isInline
|
||||
|
||||
override val symbol: FirClassSymbol
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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.fir.declarations
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.BaseTransformedType
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
|
||||
@BaseTransformedType
|
||||
interface FirDeclarationStatus : FirElement {
|
||||
val visibility: Visibility
|
||||
|
||||
val modality: Modality?
|
||||
|
||||
val isExpect: Boolean
|
||||
|
||||
val isActual: Boolean
|
||||
|
||||
val isOverride: Boolean
|
||||
|
||||
val isOperator: Boolean
|
||||
|
||||
val isInfix: Boolean
|
||||
|
||||
val isInline: Boolean
|
||||
|
||||
val isTailRec: Boolean
|
||||
|
||||
val isExternal: Boolean
|
||||
|
||||
val isConst: Boolean
|
||||
|
||||
val isLateInit: Boolean
|
||||
|
||||
val isInner: Boolean
|
||||
|
||||
val isCompanion: Boolean
|
||||
|
||||
val isData: Boolean
|
||||
|
||||
override val psi: PsiElement?
|
||||
get() = null
|
||||
|
||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
|
||||
visitor.visitDeclarationStatus(this, data)
|
||||
}
|
||||
+6
-11
@@ -11,15 +11,15 @@ import org.jetbrains.kotlin.fir.expressions.FirAnnotationContainer
|
||||
import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
|
||||
interface FirMemberDeclaration : FirTypeParameterContainer, FirNamedDeclaration, FirAnnotationContainer {
|
||||
val visibility: Visibility
|
||||
val status: FirDeclarationStatus
|
||||
|
||||
val modality: Modality?
|
||||
val visibility: Visibility get() = status.visibility
|
||||
|
||||
val platformStatus: FirMemberPlatformStatus
|
||||
val modality: Modality? get() = status.modality
|
||||
|
||||
val isExpect: Boolean get() = platformStatus == FirMemberPlatformStatus.EXPECT
|
||||
val isExpect: Boolean get() = status.isExpect
|
||||
|
||||
val isActual: Boolean get() = platformStatus == FirMemberPlatformStatus.ACTUAL
|
||||
val isActual: Boolean get() = status.isActual
|
||||
|
||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
|
||||
visitor.visitMemberDeclaration(this, data)
|
||||
@@ -29,12 +29,7 @@ interface FirMemberDeclaration : FirTypeParameterContainer, FirNamedDeclaration,
|
||||
for (typeParameter in typeParameters) {
|
||||
typeParameter.accept(visitor, data)
|
||||
}
|
||||
status.accept(visitor, data)
|
||||
super.acceptChildren(visitor, data)
|
||||
}
|
||||
}
|
||||
|
||||
enum class FirMemberPlatformStatus {
|
||||
DEFAULT,
|
||||
EXPECT,
|
||||
ACTUAL
|
||||
}
|
||||
@@ -11,15 +11,15 @@ import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
|
||||
@BaseTransformedType
|
||||
interface FirNamedFunction : @VisitedSupertype FirFunction, FirCallableMember {
|
||||
val isOperator: Boolean
|
||||
val isOperator: Boolean get() = status.isOperator
|
||||
|
||||
val isInfix: Boolean
|
||||
val isInfix: Boolean get() = status.isInfix
|
||||
|
||||
val isInline: Boolean
|
||||
val isInline: Boolean get() = status.isInline
|
||||
|
||||
val isTailRec: Boolean
|
||||
val isTailRec: Boolean get() = status.isTailRec
|
||||
|
||||
val isExternal: Boolean
|
||||
val isExternal: Boolean get() = status.isExternal
|
||||
|
||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
|
||||
visitor.visitNamedFunction(this, data)
|
||||
|
||||
@@ -14,9 +14,9 @@ import org.jetbrains.kotlin.fir.visitors.FirVisitor
|
||||
// May be should not inherit FirVariable
|
||||
@BaseTransformedType
|
||||
interface FirProperty : @VisitedSupertype FirDeclaration, FirCallableMember, FirVariable {
|
||||
val isConst: Boolean
|
||||
val isConst: Boolean get() = status.isConst
|
||||
|
||||
val isLateInit: Boolean
|
||||
val isLateInit: Boolean get() = status.isLateInit
|
||||
|
||||
// Should it be nullable or have some default?
|
||||
val getter: FirPropertyAccessor
|
||||
|
||||
@@ -14,7 +14,9 @@ interface FirPropertyAccessor : @VisitedSupertype FirFunction, FirTypedDeclarati
|
||||
|
||||
val isSetter: Boolean get() = !isGetter
|
||||
|
||||
val visibility: Visibility
|
||||
val status: FirDeclarationStatus
|
||||
|
||||
val visibility: Visibility get() = status.visibility
|
||||
|
||||
override fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R =
|
||||
visitor.visitPropertyAccessor(this, data)
|
||||
@@ -25,5 +27,6 @@ interface FirPropertyAccessor : @VisitedSupertype FirFunction, FirTypedDeclarati
|
||||
parameter.accept(visitor, data)
|
||||
}
|
||||
body?.accept(visitor, data)
|
||||
status.accept(visitor, data)
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* 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.fir.declarations
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
|
||||
interface FirResolvedDeclarationStatus : FirDeclarationStatus {
|
||||
override val visibility: Visibility
|
||||
|
||||
override val modality: Modality
|
||||
}
|
||||
+8
-5
@@ -11,8 +11,6 @@ import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirCallableMember
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.transformInplace
|
||||
import org.jetbrains.kotlin.fir.transformSingle
|
||||
import org.jetbrains.kotlin.fir.types.FirType
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
@@ -24,11 +22,16 @@ abstract class FirAbstractCallableMember(
|
||||
name: Name,
|
||||
visibility: Visibility,
|
||||
modality: Modality?,
|
||||
platformStatus: FirMemberPlatformStatus,
|
||||
final override val isOverride: Boolean,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean,
|
||||
isOverride: Boolean,
|
||||
final override var receiverType: FirType?,
|
||||
final override var returnType: FirType
|
||||
) : FirAbstractMemberDeclaration(session, psi, name, visibility, modality, platformStatus), FirCallableMember {
|
||||
) : FirAbstractMemberDeclaration(session, psi, name, visibility, modality, isExpect, isActual), FirCallableMember {
|
||||
|
||||
init {
|
||||
status.isOverride = isOverride
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
receiverType = receiverType?.transformSingle(transformer, data)
|
||||
|
||||
+14
-4
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||
import org.jetbrains.kotlin.fir.transformInplace
|
||||
import org.jetbrains.kotlin.fir.transformSingle
|
||||
@@ -22,14 +21,25 @@ abstract class FirAbstractMemberDeclaration(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
name: Name,
|
||||
final override val visibility: Visibility,
|
||||
override val modality: Modality?,
|
||||
override val platformStatus: FirMemberPlatformStatus
|
||||
visibility: Visibility,
|
||||
modality: Modality?,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean
|
||||
) : FirAbstractNamedAnnotatedDeclaration(session, psi, name), FirMemberDeclaration {
|
||||
final override val typeParameters = mutableListOf<FirTypeParameter>()
|
||||
|
||||
final override var status = FirDeclarationStatusImpl(
|
||||
session,
|
||||
visibility,
|
||||
modality
|
||||
).apply {
|
||||
this.isExpect = isExpect
|
||||
this.isActual = isActual
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
typeParameters.transformInplace(transformer, data)
|
||||
status = status.transformSingle(transformer, data)
|
||||
|
||||
return super<FirAbstractNamedAnnotatedDeclaration>.transformChildren(transformer, data)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirClass
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.fir.transformInplace
|
||||
import org.jetbrains.kotlin.fir.types.FirType
|
||||
@@ -26,21 +25,23 @@ open class FirClassImpl(
|
||||
name: Name,
|
||||
visibility: Visibility,
|
||||
modality: Modality?,
|
||||
platformStatus: FirMemberPlatformStatus,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean,
|
||||
final override val classKind: ClassKind,
|
||||
final override val isInner: Boolean,
|
||||
final override val isCompanion: Boolean,
|
||||
final override val isData: Boolean,
|
||||
override val isInline: Boolean
|
||||
) : FirAbstractMemberDeclaration(session, psi, name, visibility, modality, platformStatus), FirClass {
|
||||
isInner: Boolean,
|
||||
isCompanion: Boolean,
|
||||
isData: Boolean,
|
||||
isInline: Boolean
|
||||
) : FirAbstractMemberDeclaration(session, psi, name, visibility, modality, isExpect, isActual), FirClass {
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
status.isInner = isInner
|
||||
status.isCompanion = isCompanion
|
||||
status.isData = isData
|
||||
status.isInline = isInline
|
||||
}
|
||||
|
||||
override val modality: Modality
|
||||
get() = super.modality ?: if (classKind == ClassKind.INTERFACE) Modality.ABSTRACT else Modality.FINAL
|
||||
|
||||
override val superTypes = mutableListOf<FirType>()
|
||||
|
||||
override val declarations = mutableListOf<FirDeclaration>()
|
||||
@@ -48,8 +49,10 @@ open class FirClassImpl(
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirClass {
|
||||
superTypes.transformInplace(transformer, data)
|
||||
declarations.transformInplace(transformer, data)
|
||||
val result = super<FirAbstractMemberDeclaration>.transformChildren(transformer, data) as FirClass
|
||||
|
||||
return super<FirAbstractMemberDeclaration>.transformChildren(transformer, data) as FirClass
|
||||
// Transform declarations in last turn
|
||||
declarations.transformInplace(transformer, data)
|
||||
return result
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirConstructor
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
|
||||
import org.jetbrains.kotlin.fir.expressions.FirBody
|
||||
import org.jetbrains.kotlin.fir.expressions.FirDelegatedConstructorCall
|
||||
@@ -25,13 +24,14 @@ open class FirConstructorImpl(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
visibility: Visibility,
|
||||
platformStatus: FirMemberPlatformStatus,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean,
|
||||
delegatedSelfType: FirType,
|
||||
final override var delegatedConstructor: FirDelegatedConstructorCall?,
|
||||
override val body: FirBody?
|
||||
) : FirAbstractCallableMember(
|
||||
session, psi, NAME, visibility, Modality.FINAL,
|
||||
platformStatus, false, null, delegatedSelfType
|
||||
isExpect, isActual, isOverride = false, receiverType = null, returnType = delegatedSelfType
|
||||
), FirConstructor {
|
||||
override val valueParameters = mutableListOf<FirValueParameter>()
|
||||
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* 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.fir.declarations.impl
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclarationStatus
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl.Modifier.*
|
||||
|
||||
open class FirDeclarationStatusImpl(
|
||||
final override val session: FirSession,
|
||||
override val visibility: Visibility,
|
||||
override val modality: Modality?
|
||||
) : FirDeclarationStatus {
|
||||
protected var flags: Int = 0
|
||||
|
||||
private operator fun get(modifier: Modifier): Boolean = (flags and modifier.mask) != 0
|
||||
|
||||
private operator fun set(modifier: Modifier, value: Boolean) {
|
||||
flags = if (value) {
|
||||
flags or modifier.mask
|
||||
} else {
|
||||
flags and modifier.mask.inv()
|
||||
}
|
||||
}
|
||||
|
||||
override var isExpect: Boolean
|
||||
get() = this[EXPECT]
|
||||
set(value) {
|
||||
this[EXPECT] = value
|
||||
}
|
||||
|
||||
override var isActual: Boolean
|
||||
get() = this[ACTUAL]
|
||||
set(value) {
|
||||
this[ACTUAL] = value
|
||||
}
|
||||
|
||||
override var isOverride: Boolean
|
||||
get() = this[OVERRIDE]
|
||||
set(value) {
|
||||
this[OVERRIDE] = value
|
||||
}
|
||||
|
||||
override var isOperator: Boolean
|
||||
get() = this[OPERATOR]
|
||||
set(value) {
|
||||
this[OPERATOR] = value
|
||||
}
|
||||
|
||||
override var isInfix: Boolean
|
||||
get() = this[INFIX]
|
||||
set(value) {
|
||||
this[INFIX] = value
|
||||
}
|
||||
|
||||
override var isInline: Boolean
|
||||
get() = this[INLINE]
|
||||
set(value) {
|
||||
this[INLINE] = value
|
||||
}
|
||||
|
||||
override var isTailRec: Boolean
|
||||
get() = this[TAILREC]
|
||||
set(value) {
|
||||
this[TAILREC] = value
|
||||
}
|
||||
|
||||
override var isExternal: Boolean
|
||||
get() = this[EXTERNAL]
|
||||
set(value) {
|
||||
this[EXTERNAL] = value
|
||||
}
|
||||
|
||||
override var isConst: Boolean
|
||||
get() = this[CONST]
|
||||
set(value) {
|
||||
this[CONST] = value
|
||||
}
|
||||
|
||||
override var isLateInit: Boolean
|
||||
get() = this[LATEINIT]
|
||||
set(value) {
|
||||
this[LATEINIT] = value
|
||||
}
|
||||
|
||||
override var isInner: Boolean
|
||||
get() = this[INNER]
|
||||
set(value) {
|
||||
this[INNER] = value
|
||||
}
|
||||
|
||||
override var isCompanion: Boolean
|
||||
get() = this[COMPANION]
|
||||
set(value) {
|
||||
this[COMPANION] = value
|
||||
}
|
||||
|
||||
override var isData: Boolean
|
||||
get() = this[DATA]
|
||||
set(value) {
|
||||
this[DATA] = value
|
||||
}
|
||||
|
||||
private enum class Modifier(val mask: Int) {
|
||||
EXPECT(0x1),
|
||||
ACTUAL(0x2),
|
||||
OVERRIDE(0x4),
|
||||
OPERATOR(0x8),
|
||||
INFIX(0x10),
|
||||
INLINE(0x20),
|
||||
TAILREC(0x40),
|
||||
EXTERNAL(0x80),
|
||||
CONST(0x100),
|
||||
LATEINIT(0x200),
|
||||
INNER(0x400),
|
||||
COMPANION(0x800),
|
||||
DATA(0x1000)
|
||||
}
|
||||
|
||||
fun resolved(visibility: Visibility, modality: Modality): FirDeclarationStatus {
|
||||
return FirResolvedDeclarationStatusImpl(session, visibility, modality, flags)
|
||||
}
|
||||
}
|
||||
+15
-7
@@ -6,7 +6,9 @@
|
||||
package org.jetbrains.kotlin.fir.declarations.impl
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirPropertyAccessor
|
||||
@@ -22,10 +24,12 @@ import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
abstract class FirDefaultPropertyAccessor(
|
||||
final override val session: FirSession,
|
||||
final override val psi: PsiElement?,
|
||||
final override val isGetter: Boolean
|
||||
final override val isGetter: Boolean,
|
||||
visibility: Visibility
|
||||
) : FirPropertyAccessor {
|
||||
final override val visibility =
|
||||
Visibilities.UNKNOWN
|
||||
override var status = FirDeclarationStatusImpl(
|
||||
session, visibility, Modality.FINAL
|
||||
)
|
||||
|
||||
final override val body: FirBody? =
|
||||
null
|
||||
@@ -37,14 +41,16 @@ abstract class FirDefaultPropertyAccessor(
|
||||
class FirDefaultPropertyGetter(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
propertyType: FirType
|
||||
) : FirDefaultPropertyAccessor(session, psi, isGetter = true) {
|
||||
propertyType: FirType,
|
||||
visibility: Visibility
|
||||
) : FirDefaultPropertyAccessor(session, psi, isGetter = true, visibility = visibility) {
|
||||
override val valueParameters: List<FirValueParameter> = emptyList()
|
||||
|
||||
override var returnType: FirType = propertyType
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
returnType = returnType.transformSingle(transformer, data)
|
||||
status = status.transformSingle(transformer, data)
|
||||
|
||||
return this
|
||||
}
|
||||
@@ -53,8 +59,9 @@ class FirDefaultPropertyGetter(
|
||||
class FirDefaultPropertySetter(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
propertyType: FirType
|
||||
) : FirDefaultPropertyAccessor(session, psi, isGetter = false) {
|
||||
propertyType: FirType,
|
||||
visibility: Visibility
|
||||
) : FirDefaultPropertyAccessor(session, psi, isGetter = false, visibility = visibility) {
|
||||
override val valueParameters = mutableListOf(FirDefaultSetterValueParameter(session, psi, propertyType))
|
||||
|
||||
override var returnType: FirType = FirImplicitUnitType(session, psi)
|
||||
@@ -62,6 +69,7 @@ class FirDefaultPropertySetter(
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
valueParameters.transformInplace(transformer, data)
|
||||
returnType = returnType.transformSingle(transformer, data)
|
||||
status = status.transformSingle(transformer, data)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
+2
-2
@@ -11,7 +11,6 @@ import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirEnumEntry
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
@@ -28,7 +27,8 @@ class FirEnumEntryImpl(
|
||||
name,
|
||||
visibility = Visibilities.UNKNOWN,
|
||||
modality = Modality.FINAL,
|
||||
platformStatus = FirMemberPlatformStatus.DEFAULT,
|
||||
isExpect = false,
|
||||
isActual = false,
|
||||
classKind = ClassKind.ENUM_ENTRY,
|
||||
isInner = false,
|
||||
isCompanion = false,
|
||||
|
||||
+16
-8
@@ -10,7 +10,6 @@ import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.declarations.FirNamedFunction
|
||||
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
|
||||
import org.jetbrains.kotlin.fir.expressions.FirBody
|
||||
@@ -25,20 +24,29 @@ class FirMemberFunctionImpl(
|
||||
name: Name,
|
||||
visibility: Visibility,
|
||||
modality: Modality?,
|
||||
platformStatus: FirMemberPlatformStatus,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean,
|
||||
isOverride: Boolean,
|
||||
override val isOperator: Boolean,
|
||||
override val isInfix: Boolean,
|
||||
override val isInline: Boolean,
|
||||
override val isTailRec: Boolean,
|
||||
override val isExternal: Boolean,
|
||||
isOperator: Boolean,
|
||||
isInfix: Boolean,
|
||||
isInline: Boolean,
|
||||
isTailRec: Boolean,
|
||||
isExternal: Boolean,
|
||||
receiverType: FirType?,
|
||||
returnType: FirType,
|
||||
override val body: FirBody?
|
||||
) : FirAbstractCallableMember(
|
||||
session, psi, name, visibility, modality,
|
||||
platformStatus, isOverride, receiverType, returnType
|
||||
isExpect, isActual, isOverride, receiverType, returnType
|
||||
), FirNamedFunction {
|
||||
init {
|
||||
status.isOperator = isOperator
|
||||
status.isInfix = isInfix
|
||||
status.isInline = isInline
|
||||
status.isTailRec = isTailRec
|
||||
status.isExternal = isExternal
|
||||
}
|
||||
|
||||
override val valueParameters = mutableListOf<FirValueParameter>()
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
|
||||
+12
-6
@@ -10,7 +10,6 @@ import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.declarations.FirProperty
|
||||
import org.jetbrains.kotlin.fir.declarations.FirPropertyAccessor
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
@@ -25,10 +24,11 @@ class FirMemberPropertyImpl(
|
||||
name: Name,
|
||||
visibility: Visibility,
|
||||
modality: Modality?,
|
||||
platformStatus: FirMemberPlatformStatus,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean,
|
||||
isOverride: Boolean,
|
||||
override val isConst: Boolean,
|
||||
override val isLateInit: Boolean,
|
||||
isConst: Boolean,
|
||||
isLateInit: Boolean,
|
||||
receiverType: FirType?,
|
||||
returnType: FirType,
|
||||
override val isVar: Boolean,
|
||||
@@ -36,8 +36,14 @@ class FirMemberPropertyImpl(
|
||||
override var getter: FirPropertyAccessor,
|
||||
override var setter: FirPropertyAccessor,
|
||||
override val delegate: FirExpression?
|
||||
) : FirAbstractCallableMember(session, psi, name, visibility, modality, platformStatus, isOverride, receiverType, returnType),
|
||||
FirProperty {
|
||||
) : FirAbstractCallableMember(
|
||||
session, psi, name, visibility, modality, isExpect, isActual, isOverride, receiverType, returnType
|
||||
), FirProperty {
|
||||
init {
|
||||
status.isConst = isConst
|
||||
status.isLateInit = isLateInit
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
getter = getter.transformSingle(transformer, data)
|
||||
setter = setter.transformSingle(transformer, data)
|
||||
|
||||
+3
-3
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.fir.declarations.impl
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.expressions.FirDelegatedConstructorCall
|
||||
import org.jetbrains.kotlin.fir.types.FirType
|
||||
|
||||
@@ -16,7 +15,8 @@ class FirPrimaryConstructorImpl(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
visibility: Visibility,
|
||||
platformStatus: FirMemberPlatformStatus,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean,
|
||||
delegatedSelfType: FirType,
|
||||
delegatedConstructor: FirDelegatedConstructorCall?
|
||||
) : FirConstructorImpl(session, psi, visibility, platformStatus, delegatedSelfType, delegatedConstructor, body = null)
|
||||
) : FirConstructorImpl(session, psi, visibility, isExpect, isActual, delegatedSelfType, delegatedConstructor, body = null)
|
||||
+7
-1
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.fir.declarations.impl
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
@@ -19,12 +20,17 @@ class FirPropertyAccessorImpl(
|
||||
session: FirSession,
|
||||
psi: PsiElement?,
|
||||
override val isGetter: Boolean,
|
||||
override val visibility: Visibility,
|
||||
visibility: Visibility,
|
||||
override var returnType: FirType,
|
||||
body: FirBody?
|
||||
) : FirAbstractFunction(session, psi, body), FirPropertyAccessor {
|
||||
override var status = FirDeclarationStatusImpl(
|
||||
session, visibility, Modality.FINAL
|
||||
)
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
returnType = returnType.transformSingle(transformer, data)
|
||||
status = status.transformSingle(transformer, data)
|
||||
|
||||
return super<FirAbstractFunction>.transformChildren(transformer, data)
|
||||
}
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* 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.fir.declarations.impl
|
||||
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvedDeclarationStatus
|
||||
|
||||
class FirResolvedDeclarationStatusImpl(
|
||||
session: FirSession,
|
||||
visibility: Visibility,
|
||||
modality: Modality
|
||||
) : FirDeclarationStatusImpl(session, visibility, modality), FirResolvedDeclarationStatus {
|
||||
|
||||
internal constructor(
|
||||
session: FirSession,
|
||||
visibility: Visibility,
|
||||
modality: Modality,
|
||||
flags: Int
|
||||
) : this(session, visibility, modality) {
|
||||
this.flags = flags
|
||||
}
|
||||
|
||||
override val visibility: Visibility
|
||||
get() = super.visibility
|
||||
|
||||
override val modality: Modality
|
||||
get() = super.modality!!
|
||||
}
|
||||
+4
-10
@@ -10,10 +10,8 @@ import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirMemberPlatformStatus
|
||||
import org.jetbrains.kotlin.fir.declarations.FirTypeAlias
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeAliasSymbol
|
||||
import org.jetbrains.kotlin.fir.transformInplace
|
||||
import org.jetbrains.kotlin.fir.transformSingle
|
||||
import org.jetbrains.kotlin.fir.types.FirType
|
||||
import org.jetbrains.kotlin.fir.visitors.FirTransformer
|
||||
@@ -25,22 +23,18 @@ class FirTypeAliasImpl(
|
||||
override val symbol: FirTypeAliasSymbol,
|
||||
name: Name,
|
||||
visibility: Visibility,
|
||||
platformStatus: FirMemberPlatformStatus,
|
||||
isExpect: Boolean,
|
||||
isActual: Boolean,
|
||||
override var expandedType: FirType
|
||||
) : FirAbstractMemberDeclaration(session, psi, name, visibility, Modality.FINAL, platformStatus), FirTypeAlias {
|
||||
) : FirAbstractMemberDeclaration(session, psi, name, visibility, Modality.FINAL, isExpect, isActual), FirTypeAlias {
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
}
|
||||
|
||||
override val modality: Modality
|
||||
get() = super.modality ?: Modality.FINAL
|
||||
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
|
||||
annotations.transformInplace(transformer, data)
|
||||
typeParameters.transformInplace(transformer, data)
|
||||
expandedType = expandedType.transformSingle(transformer, data)
|
||||
|
||||
return this
|
||||
return super<FirAbstractMemberDeclaration>.transformChildren(transformer, data)
|
||||
}
|
||||
}
|
||||
+16
@@ -90,6 +90,14 @@ abstract class FirTransformer<in D> : FirVisitor<CompositeTransformResult<FirEle
|
||||
return transformDeclaration(variable, data)
|
||||
}
|
||||
|
||||
open fun transformDeclarationStatus(declarationStatus: FirDeclarationStatus, data: D): CompositeTransformResult<FirDeclarationStatus> {
|
||||
return transformElement(declarationStatus, data)
|
||||
}
|
||||
|
||||
open fun transformResolvedDeclarationStatus(resolvedDeclarationStatus: FirResolvedDeclarationStatus, data: D): CompositeTransformResult<FirDeclarationStatus> {
|
||||
return transformDeclarationStatus(resolvedDeclarationStatus, data)
|
||||
}
|
||||
|
||||
open fun transformImport(import: FirImport, data: D): CompositeTransformResult<FirImport> {
|
||||
return transformElement(import, data)
|
||||
}
|
||||
@@ -198,6 +206,10 @@ abstract class FirTransformer<in D> : FirVisitor<CompositeTransformResult<FirEle
|
||||
return transformDeclaration(declaration, data)
|
||||
}
|
||||
|
||||
final override fun visitDeclarationStatus(declarationStatus: FirDeclarationStatus, data: D): CompositeTransformResult<FirElement> {
|
||||
return transformDeclarationStatus(declarationStatus, data)
|
||||
}
|
||||
|
||||
final override fun visitDeclarationWithBody(declarationWithBody: FirDeclarationWithBody, data: D): CompositeTransformResult<FirElement> {
|
||||
return transformDeclarationWithBody(declarationWithBody, data)
|
||||
}
|
||||
@@ -286,6 +298,10 @@ abstract class FirTransformer<in D> : FirVisitor<CompositeTransformResult<FirEle
|
||||
return transformVariable(variable, data)
|
||||
}
|
||||
|
||||
final override fun visitResolvedDeclarationStatus(resolvedDeclarationStatus: FirResolvedDeclarationStatus, data: D): CompositeTransformResult<FirElement> {
|
||||
return transformResolvedDeclarationStatus(resolvedDeclarationStatus, data)
|
||||
}
|
||||
|
||||
final override fun visitAnonymousInitializer(anonymousInitializer: FirAnonymousInitializer, data: D): CompositeTransformResult<FirElement> {
|
||||
return transformAnonymousInitializer(anonymousInitializer, data)
|
||||
}
|
||||
|
||||
@@ -90,6 +90,14 @@ abstract class FirVisitor<out R, in D> {
|
||||
return visitDeclaration(variable, data)
|
||||
}
|
||||
|
||||
open fun visitDeclarationStatus(declarationStatus: FirDeclarationStatus, data: D): R {
|
||||
return visitElement(declarationStatus, data)
|
||||
}
|
||||
|
||||
open fun visitResolvedDeclarationStatus(resolvedDeclarationStatus: FirResolvedDeclarationStatus, data: D): R {
|
||||
return visitDeclarationStatus(resolvedDeclarationStatus, data)
|
||||
}
|
||||
|
||||
open fun visitImport(import: FirImport, data: D): R {
|
||||
return visitElement(import, data)
|
||||
}
|
||||
|
||||
+16
@@ -90,6 +90,14 @@ abstract class FirVisitorVoid : FirVisitor<Unit, Nothing?>() {
|
||||
visitDeclaration(variable, null)
|
||||
}
|
||||
|
||||
open fun visitDeclarationStatus(declarationStatus: FirDeclarationStatus) {
|
||||
visitElement(declarationStatus, null)
|
||||
}
|
||||
|
||||
open fun visitResolvedDeclarationStatus(resolvedDeclarationStatus: FirResolvedDeclarationStatus) {
|
||||
visitDeclarationStatus(resolvedDeclarationStatus, null)
|
||||
}
|
||||
|
||||
open fun visitImport(import: FirImport) {
|
||||
visitElement(import, null)
|
||||
}
|
||||
@@ -198,6 +206,10 @@ abstract class FirVisitorVoid : FirVisitor<Unit, Nothing?>() {
|
||||
visitDeclaration(declaration)
|
||||
}
|
||||
|
||||
final override fun visitDeclarationStatus(declarationStatus: FirDeclarationStatus, data: Nothing?) {
|
||||
visitDeclarationStatus(declarationStatus)
|
||||
}
|
||||
|
||||
final override fun visitDeclarationWithBody(declarationWithBody: FirDeclarationWithBody, data: Nothing?) {
|
||||
visitDeclarationWithBody(declarationWithBody)
|
||||
}
|
||||
@@ -286,6 +298,10 @@ abstract class FirVisitorVoid : FirVisitor<Unit, Nothing?>() {
|
||||
visitVariable(variable)
|
||||
}
|
||||
|
||||
final override fun visitResolvedDeclarationStatus(resolvedDeclarationStatus: FirResolvedDeclarationStatus, data: Nothing?) {
|
||||
visitResolvedDeclarationStatus(resolvedDeclarationStatus)
|
||||
}
|
||||
|
||||
final override fun visitAnonymousInitializer(anonymousInitializer: FirAnonymousInitializer, data: Nothing?) {
|
||||
visitAnonymousInitializer(anonymousInitializer)
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ FILE: F.kt
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
public? final class B : A {
|
||||
public? final? class B : A {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ FILE: NestedOfAliasedType.kt
|
||||
|
||||
}
|
||||
public? final typealias TA = A
|
||||
public? final class B : TA {
|
||||
public? final? class B : TA {
|
||||
public? constructor(): super<TA>()
|
||||
|
||||
public? final class NestedInB : Nested {
|
||||
public? final? class NestedInB : Nested {
|
||||
public? constructor(): super<Nested>()
|
||||
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ FILE: NestedSuperType.kt
|
||||
}
|
||||
|
||||
}
|
||||
public? final class Your : My {
|
||||
public? final? class Your : My {
|
||||
public? constructor(): super<My>()
|
||||
|
||||
public? final class NestedThree : NestedOne {
|
||||
public? final? class NestedThree : NestedOne {
|
||||
public? constructor(): super<NestedOne>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
FILE: complexTypes.kt
|
||||
<T, out S> public? final class C {
|
||||
<T, out S> public? final? class C {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
<R, in P> public? final inner class D {
|
||||
<R, in P> public? final? inner class D {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public? abstract interface Test {
|
||||
public? final? interface Test {
|
||||
public? final? property x(val): a.b.C<out CharSequence, *>.D<in List<*>, *>
|
||||
public? get(): a.b.C<out CharSequence, *>.D<in List<*>, *>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ FILE: derivedClass.kt
|
||||
public? get(): T
|
||||
|
||||
}
|
||||
<T : Any> public? final class Derived : Base<T> {
|
||||
<T : Any> public? final? class Derived : Base<T> {
|
||||
public? constructor(x: T): super<Base<T>>()
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
FILE: enums.kt
|
||||
public? final enum class Order {
|
||||
public? final? enum class Order {
|
||||
public? constructor(): super<kotlin.Enum>()
|
||||
|
||||
public? final enum entry FIRST {
|
||||
@@ -18,14 +18,14 @@ FILE: enums.kt
|
||||
}
|
||||
|
||||
}
|
||||
public? final enum class Planet {
|
||||
public? final? enum class Planet {
|
||||
public? constructor(m: Double, r: Double): super<kotlin.Enum>()
|
||||
|
||||
public? final? property m(val): Double
|
||||
public? get(): Double
|
||||
|
||||
internal final? property r(val): Double
|
||||
public? get(): Double
|
||||
internal get(): Double
|
||||
|
||||
public? final enum entry MERCURY : Planet {
|
||||
public? constructor(): super<Planet>()
|
||||
@@ -56,7 +56,7 @@ FILE: enums.kt
|
||||
|
||||
public? abstract function sayHello(): kotlin.Unit
|
||||
|
||||
public? final companion object Companion {
|
||||
public? final? companion object Companion {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
public? final? const property G(val): <implicit> = STUB
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
FILE: enums2.kt
|
||||
public? abstract interface Some {
|
||||
public? final? interface Some {
|
||||
}
|
||||
public? final object O1 : Some {
|
||||
public? final? object O1 : Some {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
public? final object O2 : Some {
|
||||
public? final? object O2 : Some {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
public? final enum class SomeEnum {
|
||||
public? final? enum class SomeEnum {
|
||||
public? constructor(x: Some): super<kotlin.Enum>()
|
||||
|
||||
public? final? property x(val): Some
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
FILE: expectActual.kt
|
||||
public? final expect class MyClass {
|
||||
public? final? expect class MyClass {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
public? final? expect function foo(): String
|
||||
public? final? expect property x(val): Int
|
||||
public? get(): Int
|
||||
public? final actual class MyClass {
|
||||
public? final? actual class MyClass {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: genericFunctions.kt
|
||||
public? abstract interface Any {
|
||||
public? final? interface Any {
|
||||
}
|
||||
<reified T : Any> public? final? inline function safeAs Any.(): T? {
|
||||
STUB
|
||||
|
||||
@@ -6,15 +6,15 @@ FILE: nestedClass.kt
|
||||
public? get(): String
|
||||
|
||||
}
|
||||
public? final class Outer {
|
||||
public? final? class Outer {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
public? final class Derived : Base {
|
||||
public? final? class Derived : Base {
|
||||
public? constructor(s: String): super<Base>()
|
||||
|
||||
}
|
||||
|
||||
public? final object Obj : Base {
|
||||
public? final? object Obj : Base {
|
||||
public? constructor(): super<Base>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: noPrimaryConstructor.kt
|
||||
public? final class NoPrimary {
|
||||
public? final? class NoPrimary {
|
||||
public? final? property x(val): String
|
||||
public? get(): String
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
FILE: simpleClass.kt
|
||||
public? abstract interface SomeInterface {
|
||||
public? final? interface SomeInterface {
|
||||
public? final? function foo(x: Int, y: String): String
|
||||
|
||||
public? final? property bar(val): Boolean
|
||||
public? get(): Boolean
|
||||
|
||||
}
|
||||
public? final class SomeClass : SomeInterface {
|
||||
public? final? class SomeClass : SomeInterface {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
private final? property baz(val): <implicit> = STUB
|
||||
public? get(): <implicit>
|
||||
private get(): <implicit>
|
||||
|
||||
public? open? override function foo(x: Int, y: String): String {
|
||||
}
|
||||
@@ -27,7 +27,7 @@ FILE: simpleClass.kt
|
||||
public? set(value: Double): kotlin.Unit
|
||||
|
||||
}
|
||||
public? final inline class InlineClass {
|
||||
public? final? inline class InlineClass {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FILE: simpleTypeAlias.kt
|
||||
public? abstract interface B {
|
||||
public? final? interface B {
|
||||
}
|
||||
public? final typealias C = B
|
||||
public? final class D : C {
|
||||
public? final? class D : C {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ FILE: typeAliasWithGeneric.kt
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
<S, T : A> public? abstract interface B {
|
||||
<S, T : A> public? final? interface B {
|
||||
}
|
||||
<T> public? final typealias C = B<T, A>
|
||||
public? final class D : C<A> {
|
||||
public? final? class D : C<A> {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
FILE: typeParameterVsNested.kt
|
||||
public? abstract interface Some {
|
||||
public? final? interface Some {
|
||||
}
|
||||
<T : Some> public? abstract class My {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
public? final inner class T {
|
||||
public? final? inner class T {
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
@@ -20,7 +20,7 @@ FILE: typeParameterVsNested.kt
|
||||
public? abstract property z(val): test.My.T
|
||||
public? get(): test.My.T
|
||||
|
||||
public? final class Some : T {
|
||||
public? final? class Some : T {
|
||||
public? constructor(): super<T>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: typeParameters.kt
|
||||
<out T : Any> public? abstract interface List {
|
||||
<out T : Any> public? final? interface List {
|
||||
public? final? operator function get(index: Int): T
|
||||
|
||||
public? final? infix function concat(other: List<T>): List<T>
|
||||
@@ -11,7 +11,7 @@ FILE: typeParameters.kt
|
||||
public? constructor(): super<kotlin.Any>()
|
||||
|
||||
}
|
||||
public? final class SomeList : AbstractList<Int> {
|
||||
public? final? class SomeList : AbstractList<Int> {
|
||||
public? constructor(): super<AbstractList<Int>>()
|
||||
|
||||
public? open? override function get(index: Int): Int {
|
||||
|
||||
Vendored
+4
-4
@@ -1,9 +1,9 @@
|
||||
FILE: F.kt
|
||||
public? open class A {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public open class A {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
public? final class B : R|A| {
|
||||
public? constructor(): super<R|A|>()
|
||||
public final class B : R|A| {
|
||||
public constructor(): super<R|A|>()
|
||||
|
||||
}
|
||||
|
||||
+9
-9
@@ -1,19 +1,19 @@
|
||||
FILE: NestedOfAliasedType.kt
|
||||
public? abstract class A {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class A {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? abstract class Nested {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class Nested {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public? final typealias TA = R|A|
|
||||
public? final class B : R|TA = A| {
|
||||
public? constructor(): super<R|TA = A|>()
|
||||
public final typealias TA = R|A|
|
||||
public final class B : R|TA = A| {
|
||||
public constructor(): super<R|TA = A|>()
|
||||
|
||||
public? final class NestedInB : R|A.Nested| {
|
||||
public? constructor(): super<R|A.Nested|>()
|
||||
public final class NestedInB : R|A.Nested| {
|
||||
public constructor(): super<R|A.Nested|>()
|
||||
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -1,23 +1,23 @@
|
||||
FILE: NestedSuperType.kt
|
||||
public? abstract class My {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class My {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? abstract class NestedOne : R|p/My| {
|
||||
public? constructor(): super<R|p/My|>()
|
||||
public abstract class NestedOne : R|p/My| {
|
||||
public constructor(): super<R|p/My|>()
|
||||
|
||||
public? abstract class NestedTwo : R|p/My.NestedOne| {
|
||||
public? constructor(): super<R|p/My.NestedOne|>()
|
||||
public abstract class NestedTwo : R|p/My.NestedOne| {
|
||||
public constructor(): super<R|p/My.NestedOne|>()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public? final class Your : R|p/My| {
|
||||
public? constructor(): super<R|p/My|>()
|
||||
public final class Your : R|p/My| {
|
||||
public constructor(): super<R|p/My|>()
|
||||
|
||||
public? final class NestedThree : R|p/My.NestedOne| {
|
||||
public? constructor(): super<R|p/My.NestedOne|>()
|
||||
public final class NestedThree : R|p/My.NestedOne| {
|
||||
public constructor(): super<R|p/My.NestedOne|>()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FILE: TwoDeclarationsInSameFile.kt
|
||||
public? open class A {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public open class A {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
public? final class B : R|p/A| {
|
||||
public? constructor(): super<R|p/A|>()
|
||||
public final class B : R|p/A| {
|
||||
public constructor(): super<R|p/A|>()
|
||||
|
||||
}
|
||||
|
||||
+6
-6
@@ -1,15 +1,15 @@
|
||||
FILE: lists.kt
|
||||
public? abstract class MyStringList : R|kotlin/collections/List<kotlin/String>| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class MyStringList : R|kotlin/collections/List<kotlin/String>| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
public? abstract class MyMutableStringList : R|kotlin/collections/MutableList<kotlin/String>| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class MyMutableStringList : R|kotlin/collections/MutableList<kotlin/String>| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
public? final? function convert R|kotlin/collections/List<kotlin/String>|.(): R|MyStringList| {
|
||||
public final function convert R|kotlin/collections/List<kotlin/String>|.(): R|MyStringList| {
|
||||
STUB
|
||||
}
|
||||
public? final? function ret(l: R|kotlin/collections/MutableList<kotlin/String>|): R|MyMutableStringList| {
|
||||
public final function ret(l: R|kotlin/collections/MutableList<kotlin/String>|): R|MyMutableStringList| {
|
||||
STUB
|
||||
}
|
||||
|
||||
+16
-16
@@ -1,35 +1,35 @@
|
||||
FILE: companion.kt
|
||||
public? abstract class Some {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class Some {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? final companion object Companion {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final companion object Companion {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? final class InCompanion {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final class InCompanion {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public? abstract property x(val): R|test/Some.Companion.InCompanion|
|
||||
public? get(): R|test/Some.Companion.InCompanion|
|
||||
public abstract property x(val): R|test/Some.Companion.InCompanion|
|
||||
public get(): R|test/Some.Companion.InCompanion|
|
||||
|
||||
}
|
||||
public? abstract class Another {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class Another {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? final companion object NamedCompanion {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final companion object NamedCompanion {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? final class InCompanion {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final class InCompanion {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public? abstract property x(val): R|test/Another.NamedCompanion.InCompanion|
|
||||
public? get(): R|test/Another.NamedCompanion.InCompanion|
|
||||
public abstract property x(val): R|test/Another.NamedCompanion.InCompanion|
|
||||
public get(): R|test/Another.NamedCompanion.InCompanion|
|
||||
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,15 +1,15 @@
|
||||
FILE: derivedClass.kt
|
||||
<T> public? open class Base {
|
||||
public? constructor(x: R|T|): super<R|kotlin/Any|>()
|
||||
<T> public open class Base {
|
||||
public constructor(x: R|T|): super<R|kotlin/Any|>()
|
||||
|
||||
public? final? property x(val): R|T|
|
||||
public? get(): R|T|
|
||||
public final property x(val): R|T|
|
||||
public get(): R|T|
|
||||
|
||||
}
|
||||
<T : R|kotlin/Any|> public? final class Derived : R|Base<T>| {
|
||||
public? constructor(x: R|T|): super<R|Base<T>|>()
|
||||
<T : R|kotlin/Any|> public final class Derived : R|Base<T>| {
|
||||
public constructor(x: R|T|): super<R|Base<T>|>()
|
||||
|
||||
}
|
||||
<T : R|kotlin/Any|> public? final? function create(x: R|T|): R|Derived<T>| {
|
||||
<T : R|kotlin/Any|> public final function create(x: R|T|): R|Derived<T>| {
|
||||
STUB
|
||||
}
|
||||
|
||||
+16
-16
@@ -1,38 +1,38 @@
|
||||
FILE: enum.kt
|
||||
public? abstract interface Some {
|
||||
public abstract interface Some {
|
||||
}
|
||||
public? final object O1 : R|Some| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final object O1 : R|Some| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
public? final object O2 : R|Some| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final object O2 : R|Some| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
public? final enum class SomeEnum {
|
||||
public? constructor(x: R|Some|): super<R|kotlin/Enum|>()
|
||||
public final enum class SomeEnum {
|
||||
private constructor(x: R|Some|): super<R|kotlin/Enum|>()
|
||||
|
||||
public? final? property x(val): R|Some|
|
||||
public? get(): R|Some|
|
||||
public final property x(val): R|Some|
|
||||
public get(): R|Some|
|
||||
|
||||
public? final enum entry FIRST : R|SomeEnum| {
|
||||
public? constructor(): super<R|SomeEnum|>()
|
||||
public final enum entry FIRST : R|SomeEnum| {
|
||||
public constructor(): super<R|SomeEnum|>()
|
||||
|
||||
public? open? override function check(y: R|Some|): R|kotlin/Boolean| {
|
||||
public final override function check(y: R|Some|): R|kotlin/Boolean| {
|
||||
STUB
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public? final enum entry SECOND : R|SomeEnum| {
|
||||
public? constructor(): super<R|SomeEnum|>()
|
||||
public final enum entry SECOND : R|SomeEnum| {
|
||||
public constructor(): super<R|SomeEnum|>()
|
||||
|
||||
public? open? override function check(y: R|Some|): R|kotlin/Boolean| {
|
||||
public final override function check(y: R|Some|): R|kotlin/Boolean| {
|
||||
STUB
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public? abstract function check(y: R|Some|): R|kotlin/Boolean|
|
||||
public abstract function check(y: R|Some|): R|kotlin/Boolean|
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package a.b
|
||||
|
||||
class C<T, out S> {
|
||||
inner class D<R, in P> {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
interface Test {
|
||||
val x: a.b.C<out CharSequence, *>.D<in List<*>, *>
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
FILE: complexTypes.kt
|
||||
<T, out S> public final class C {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
<R, in P> public final inner class D {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public abstract interface Test {
|
||||
public abstract property x(val): R|a/b/C.D<out kotlin/CharSequence, *, in kotlin/collections/List<*>, *>|
|
||||
public get(): R|a/b/C.D<out kotlin/CharSequence, *, in kotlin/collections/List<*>, *>|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import my.println
|
||||
|
||||
enum class Order {
|
||||
FIRST,
|
||||
SECOND,
|
||||
THIRD
|
||||
}
|
||||
|
||||
enum class Planet(val m: Double, internal val r: Double) {
|
||||
MERCURY(1.0, 2.0) {
|
||||
override fun sayHello() {
|
||||
println("Hello!!!")
|
||||
}
|
||||
},
|
||||
VENERA(3.0, 4.0) {
|
||||
override fun sayHello() {
|
||||
println("Ola!!!")
|
||||
}
|
||||
},
|
||||
EARTH(5.0, 6.0) {
|
||||
override fun sayHello() {
|
||||
println("Privet!!!")
|
||||
}
|
||||
};
|
||||
|
||||
val g: Double = G * m / (r * r)
|
||||
|
||||
abstract fun sayHello()
|
||||
|
||||
companion object {
|
||||
const val G = 6.67e-11
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
FILE: enums.kt
|
||||
public final enum class Order {
|
||||
private constructor(): super<R|kotlin/Enum|>()
|
||||
|
||||
public final enum entry FIRST {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
public final enum entry SECOND {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
public final enum entry THIRD {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final enum class Planet {
|
||||
private constructor(m: R|kotlin/Double|, r: R|kotlin/Double|): super<R|kotlin/Enum|>()
|
||||
|
||||
public final property m(val): R|kotlin/Double|
|
||||
public get(): R|kotlin/Double|
|
||||
|
||||
internal final property r(val): R|kotlin/Double|
|
||||
internal get(): R|kotlin/Double|
|
||||
|
||||
public final enum entry MERCURY : R|Planet| {
|
||||
public constructor(): super<R|Planet|>()
|
||||
|
||||
public final override function sayHello(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final enum entry VENERA : R|Planet| {
|
||||
public constructor(): super<R|Planet|>()
|
||||
|
||||
public final override function sayHello(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final enum entry EARTH : R|Planet| {
|
||||
public constructor(): super<R|Planet|>()
|
||||
|
||||
public final override function sayHello(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final property g(val): R|kotlin/Double| = STUB
|
||||
public get(): R|kotlin/Double|
|
||||
|
||||
public abstract function sayHello(): R|kotlin/Unit|
|
||||
|
||||
public final companion object Companion {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public final const property G(val): R|error: Not supported: FirImplicitTypeImpl| = STUB
|
||||
public get(): R|error: Not supported: FirImplicitTypeImpl|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class NoPrimary {
|
||||
val x: String
|
||||
|
||||
constructor(x: String) {
|
||||
this.x = x
|
||||
}
|
||||
|
||||
constructor(): this("")
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
FILE: noPrimaryConstructor.kt
|
||||
public final class NoPrimary {
|
||||
public final property x(val): R|kotlin/String|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public constructor(x: R|kotlin/String|): super<R|kotlin/Any|>() {
|
||||
}
|
||||
|
||||
public constructor(): this<R|NoPrimary|>()
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
interface SomeInterface {
|
||||
fun foo(x: Int, y: String): String
|
||||
|
||||
val bar: Boolean
|
||||
}
|
||||
|
||||
class SomeClass : SomeInterface {
|
||||
private val baz = 42
|
||||
|
||||
override fun foo(x: Int, y: String): String {
|
||||
return y + x + baz
|
||||
}
|
||||
|
||||
override var bar: Boolean
|
||||
get() = true
|
||||
set(value) {}
|
||||
|
||||
lateinit var fau: Double
|
||||
}
|
||||
|
||||
inline class InlineClass
|
||||
@@ -0,0 +1,33 @@
|
||||
FILE: simpleClass.kt
|
||||
public abstract interface SomeInterface {
|
||||
public abstract function foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String|
|
||||
|
||||
public abstract property bar(val): R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean|
|
||||
|
||||
}
|
||||
public final class SomeClass : R|SomeInterface| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
private final property baz(val): R|error: Not supported: FirImplicitTypeImpl| = STUB
|
||||
private get(): R|error: Not supported: FirImplicitTypeImpl|
|
||||
|
||||
public final override function foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String| {
|
||||
}
|
||||
|
||||
public final override property bar(var): R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean| {
|
||||
STUB
|
||||
}
|
||||
public set(value: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public final lateinit property fau(var): R|kotlin/Double|
|
||||
public get(): R|kotlin/Double|
|
||||
public set(value: R|kotlin/Double|): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
public final inline class InlineClass {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
interface List<out T : Any> {
|
||||
operator fun get(index: Int): T
|
||||
|
||||
infix fun concat(other: List<T>): List<T>
|
||||
}
|
||||
|
||||
typealias StringList = List<out String>
|
||||
typealias AnyList = List<*>
|
||||
|
||||
abstract class AbstractList<out T : Any> : List<T>
|
||||
|
||||
class SomeList : AbstractList<Int>() {
|
||||
override fun get(index: Int): Int = 42
|
||||
|
||||
override fun concat(other: List<Int>): List<Int> = this
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
FILE: typeParameters.kt
|
||||
<out T : R|kotlin/Any|> public abstract interface List {
|
||||
public abstract operator function get(index: R|kotlin/Int|): R|T|
|
||||
|
||||
public abstract infix function concat(other: R|List<T>|): R|List<T>|
|
||||
|
||||
}
|
||||
public final typealias StringList = R|List<out kotlin/String>|
|
||||
public final typealias AnyList = R|List<*>|
|
||||
<out T : R|kotlin/Any|> public abstract class AbstractList : R|List<T>| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
public final class SomeList : R|AbstractList<kotlin/Int>| {
|
||||
public constructor(): super<R|AbstractList<kotlin/Int>|>()
|
||||
|
||||
public final override function get(index: R|kotlin/Int|): R|kotlin/Int| {
|
||||
STUB
|
||||
}
|
||||
|
||||
public final override function concat(other: R|List<kotlin/Int>|): R|List<kotlin/Int>| {
|
||||
STUB
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
FILE: ft.kt
|
||||
<T> public? abstract interface KMutableProperty1 : R|KProperty1<T>| {
|
||||
<T> public abstract interface KMutableProperty1 : R|KProperty1<T>| {
|
||||
}
|
||||
<T> public? abstract interface KProperty1 : R|(T) -> kotlin/Int| {
|
||||
<T> public abstract interface KProperty1 : R|(T) -> kotlin/Int| {
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,17 +1,17 @@
|
||||
FILE: functionTypes.kt
|
||||
<T> public? final? function simpleRun(f: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
<T> public final function simpleRun(f: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
STUB
|
||||
}
|
||||
<T, R> public? final? function simpleMap R|kotlin/collections/List<T>|.(f: R|(T) -> R|): R|R| {
|
||||
<T, R> public final function simpleMap R|kotlin/collections/List<T>|.(f: R|(T) -> R|): R|R| {
|
||||
}
|
||||
<T> public? final? function simpleWith(t: R|T|, f: R|T.() -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
<T> public final function simpleWith(t: R|T|, f: R|T.() -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
STUB
|
||||
}
|
||||
<T, R> public? abstract interface KMutableProperty1 : R|KProperty1<T, R>|, R|KMutableProperty<R>| {
|
||||
<T, R> public abstract interface KMutableProperty1 : R|KProperty1<T, R>|, R|KMutableProperty<R>| {
|
||||
}
|
||||
<T, out R> public? abstract interface KProperty1 : R|KProperty<R>|, R|(T) -> R| {
|
||||
<T, out R> public abstract interface KProperty1 : R|KProperty<R>|, R|(T) -> R| {
|
||||
}
|
||||
<out R> public? abstract interface KProperty {
|
||||
<out R> public abstract interface KProperty {
|
||||
}
|
||||
<R> public? abstract interface KMutableProperty {
|
||||
<R> public abstract interface KMutableProperty {
|
||||
}
|
||||
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
FILE: genericFunctions.kt
|
||||
public? abstract interface Any {
|
||||
public abstract interface Any {
|
||||
}
|
||||
<reified T : R|Any|> public? final? inline function safeAs R|Any|.(): R|T| {
|
||||
<reified T : R|Any|> public final inline function safeAs R|Any|.(): R|T| {
|
||||
STUB
|
||||
}
|
||||
public? abstract class Summator {
|
||||
public? constructor(): super<R|Any|>()
|
||||
public abstract class Summator {
|
||||
public constructor(): super<R|Any|>()
|
||||
|
||||
<T> public? abstract function plus(first: R|T|, second: R|T|): R|T|
|
||||
<T> public abstract function plus(first: R|T|, second: R|T|): R|T|
|
||||
|
||||
}
|
||||
|
||||
+14
-14
@@ -1,29 +1,29 @@
|
||||
FILE: Annotations.kt
|
||||
@FILE:R|annotations/Simple|()
|
||||
@R|annotations/WithInt|(STUB) public? abstract class First {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
@R|annotations/WithInt|(STUB) public abstract class First {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
@R|annotations/Simple|() public? abstract function foo(@R|annotations/WithString|(STUB) arg: @R|annotations/Simple|() R|kotlin/Double|): R|kotlin/Unit|
|
||||
@R|annotations/Simple|() public abstract function foo(@R|annotations/WithString|(STUB) arg: @R|annotations/Simple|() R|kotlin/Double|): R|kotlin/Unit|
|
||||
|
||||
@R|annotations/Complex|(STUB, STUB) public? abstract property v(val): R|kotlin/String|
|
||||
public? get(): R|kotlin/String|
|
||||
@R|annotations/Complex|(STUB, STUB) public abstract property v(val): R|kotlin/String|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
@R|annotations/WithString|(STUB) public? final class Second : @R|annotations/WithInt|(STUB) R|test/First| {
|
||||
public? constructor(y: R|kotlin/Char|): super<@R|annotations/WithInt|(STUB) R|test/First|>()
|
||||
@R|annotations/WithString|(STUB) public final class Second : @R|annotations/WithInt|(STUB) R|test/First| {
|
||||
public constructor(y: R|kotlin/Char|): super<@R|annotations/WithInt|(STUB) R|test/First|>()
|
||||
|
||||
public? final? property y(val): R|kotlin/Char|
|
||||
public? get(): R|kotlin/Char|
|
||||
public final property y(val): R|kotlin/Char|
|
||||
public get(): R|kotlin/Char|
|
||||
|
||||
public? open? override function foo(arg: R|kotlin/Double|): R|kotlin/Unit| {
|
||||
public final override function foo(arg: R|kotlin/Double|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public? open? override property v(val): R|kotlin/String|
|
||||
@R|annotations/Simple|() public? get(): R|kotlin/String| {
|
||||
public final override property v(val): R|kotlin/String|
|
||||
@R|annotations/Simple|() public get(): R|kotlin/String| {
|
||||
STUB
|
||||
}
|
||||
|
||||
@R|annotations/WithString|(STUB) public? constructor(): this<R|test/Second|>()
|
||||
@R|annotations/WithString|(STUB) public constructor(): this<R|test/Second|>()
|
||||
|
||||
}
|
||||
@R|annotations/WithInt|(STUB) @R|annotations/WithInt|(STUB) public? final typealias Third = @R|annotations/Simple|() R|test/Second|
|
||||
@R|annotations/WithInt|(STUB) @R|annotations/WithInt|(STUB) public final typealias Third = @R|annotations/Simple|() R|test/Second|
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
FILE: NestedSuperType.kt
|
||||
public? final class A : R|b/B| {
|
||||
public? constructor(): super<R|b/B|>()
|
||||
public final class A : R|b/B| {
|
||||
public constructor(): super<R|b/B|>()
|
||||
|
||||
public? final class NestedInA1 : R|b/B.NestedInB| {
|
||||
public? constructor(): super<R|b/B.NestedInB|>()
|
||||
public final class NestedInA1 : R|b/B.NestedInB| {
|
||||
public constructor(): super<R|b/B.NestedInB|>()
|
||||
|
||||
}
|
||||
|
||||
public? final class NestedInA2 : R|c/C.NestedInC| {
|
||||
public? constructor(): super<R|c/C.NestedInC|>()
|
||||
public final class NestedInA2 : R|c/C.NestedInC| {
|
||||
public constructor(): super<R|c/C.NestedInC|>()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: TypeAliasExpansion.kt
|
||||
public? final class MyClass : R|b/TA = b/A| {
|
||||
public? constructor(): super<R|b/TA = b/A|>()
|
||||
public final class MyClass : R|b/TA = b/A| {
|
||||
public constructor(): super<R|b/TA = b/A|>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FILE: sealedStarImport.kt
|
||||
public? abstract class Factory {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public abstract class Factory {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? abstract function createTest(): R|error: Symbol not found|
|
||||
public abstract function createTest(): R|error: Symbol not found|
|
||||
|
||||
public? abstract function createObj(): R|test/Test.O|
|
||||
public abstract function createObj(): R|test/Test.O|
|
||||
|
||||
public? abstract function createExtra(): R|test/Test.Extra|
|
||||
public abstract function createExtra(): R|test/Test.Extra|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: simpleAliasedImport.kt
|
||||
public? final class YourClass : R|b/MyClass| {
|
||||
public? constructor(): super<R|b/MyClass|>()
|
||||
public final class YourClass : R|b/MyClass| {
|
||||
public constructor(): super<R|b/MyClass|>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: simpleImport.kt
|
||||
public? final class YourClass : R|b/MyClass| {
|
||||
public? constructor(): super<R|b/MyClass|>()
|
||||
public final class YourClass : R|b/MyClass| {
|
||||
public constructor(): super<R|b/MyClass|>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: simpleImportNested.kt
|
||||
public? final class YourClass : R|a/MyClass.MyNested| {
|
||||
public? constructor(): super<R|a/MyClass.MyNested|>()
|
||||
public final class YourClass : R|a/MyClass.MyNested| {
|
||||
public constructor(): super<R|a/MyClass.MyNested|>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: simpleImportOuter.kt
|
||||
public? final class My : R|a/Outer.Nested| {
|
||||
public? constructor(): super<R|a/Outer.Nested|>()
|
||||
public final class My : R|a/Outer.Nested| {
|
||||
public constructor(): super<R|a/Outer.Nested|>()
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
FILE: simpleStarImport.kt
|
||||
public? final? function foo(arg: R|b/d/Other|): R|b/d/Another|
|
||||
public final function foo(arg: R|b/d/Other|): R|b/d/Another|
|
||||
|
||||
+10
-10
@@ -1,21 +1,21 @@
|
||||
FILE: nestedClass.kt
|
||||
public? abstract class Base {
|
||||
public? constructor(s: R|kotlin/String|): super<R|kotlin/Any|>()
|
||||
public abstract class Base {
|
||||
public constructor(s: R|kotlin/String|): super<R|kotlin/Any|>()
|
||||
|
||||
public? final? property s(val): R|kotlin/String|
|
||||
public? get(): R|kotlin/String|
|
||||
public final property s(val): R|kotlin/String|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public? final class Outer {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final class Outer {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? final class Derived : R|Base| {
|
||||
public? constructor(s: R|kotlin/String|): super<R|Base|>()
|
||||
public final class Derived : R|Base| {
|
||||
public constructor(s: R|kotlin/String|): super<R|Base|>()
|
||||
|
||||
}
|
||||
|
||||
public? final object Obj : R|Base| {
|
||||
public? constructor(): super<R|Base|>()
|
||||
public final object Obj : R|Base| {
|
||||
public constructor(): super<R|Base|>()
|
||||
|
||||
}
|
||||
|
||||
|
||||
+15
-15
@@ -1,29 +1,29 @@
|
||||
FILE: simpleClass.kt
|
||||
public? abstract interface SomeInterface {
|
||||
public? final? function foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String|
|
||||
public abstract interface SomeInterface {
|
||||
public abstract function foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String|
|
||||
|
||||
public? final? property bar(val): R|kotlin/Boolean|
|
||||
public? get(): R|kotlin/Boolean|
|
||||
public abstract property bar(val): R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean|
|
||||
|
||||
}
|
||||
public? final class SomeClass : R|SomeInterface| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final class SomeClass : R|SomeInterface| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
private final? property baz(val): R|error: Not supported: FirImplicitTypeImpl| = STUB
|
||||
public? get(): R|error: Not supported: FirImplicitTypeImpl|
|
||||
private final property baz(val): R|error: Not supported: FirImplicitTypeImpl| = STUB
|
||||
private get(): R|error: Not supported: FirImplicitTypeImpl|
|
||||
|
||||
public? open? override function foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String| {
|
||||
public final override function foo(x: R|kotlin/Int|, y: R|kotlin/String|): R|kotlin/String| {
|
||||
}
|
||||
|
||||
public? open? override property bar(var): R|kotlin/Boolean|
|
||||
public? get(): R|kotlin/Boolean| {
|
||||
public final override property bar(var): R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean| {
|
||||
STUB
|
||||
}
|
||||
public? set(value: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
public set(value: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
public? final? property fau(var): R|kotlin/Double|
|
||||
public? get(): R|kotlin/Double|
|
||||
public? set(value: R|kotlin/Double|): R|kotlin/Unit|
|
||||
public final property fau(var): R|kotlin/Double|
|
||||
public get(): R|kotlin/Double|
|
||||
public set(value: R|kotlin/Double|): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
FILE: simpleTypeAlias.kt
|
||||
public? abstract interface B {
|
||||
public abstract interface B {
|
||||
}
|
||||
public? final typealias C = R|B|
|
||||
public? final class D : R|C = B| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final typealias C = R|B|
|
||||
public final class D : R|C = B| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
FILE: concurrent.kt
|
||||
@R|kotlin/jvm/Volatile|() public? final? property xx(var): R|kotlin/Int| = STUB
|
||||
public? get(): R|kotlin/Int|
|
||||
public? set(value: R|kotlin/Int|): R|kotlin/Unit|
|
||||
@R|kotlin/jvm/Synchronized|() public? final? function foo(): R|kotlin/Unit| {
|
||||
@R|kotlin/jvm/Volatile|() public final property xx(var): R|kotlin/Int| = STUB
|
||||
public get(): R|kotlin/Int|
|
||||
public set(value: R|kotlin/Int|): R|kotlin/Unit|
|
||||
@R|kotlin/jvm/Synchronized|() public final function foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,12 +1,12 @@
|
||||
FILE: functionX.kt
|
||||
public? final? property x(val): R|kotlin/jvm/functions/Function0<kotlin/Int>| = STUB
|
||||
public? get(): R|kotlin/jvm/functions/Function0<kotlin/Int>|
|
||||
public? final? property y(val): R|kotlin/Function1<kotlin/String, kotlin/String>| = STUB
|
||||
public? get(): R|kotlin/Function1<kotlin/String, kotlin/String>|
|
||||
public? final class MyFunction : R|kotlin/Function2<kotlin/Int, kotlin/String, kotlin/Unit>| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final property x(val): R|kotlin/jvm/functions/Function0<kotlin/Int>| = STUB
|
||||
public get(): R|kotlin/jvm/functions/Function0<kotlin/Int>|
|
||||
public final property y(val): R|kotlin/Function1<kotlin/String, kotlin/String>| = STUB
|
||||
public get(): R|kotlin/Function1<kotlin/String, kotlin/String>|
|
||||
public final class MyFunction : R|kotlin/Function2<kotlin/Int, kotlin/String, kotlin/Unit>| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? open? override function invoke(p1: R|kotlin/Int|, p2: R|kotlin/String|): R|kotlin/Unit| {
|
||||
public final override function invoke(p1: R|kotlin/Int|, p2: R|kotlin/String|): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: reflectionClass.kt
|
||||
public? final? property javaClass(val): R|java/lang/Class<kotlin/String>| = STUB
|
||||
public? get(): R|java/lang/Class<kotlin/String>|
|
||||
public? final? property kotlinClass(val): R|kotlin/reflect/KClass<kotlin/String>| = STUB
|
||||
public? get(): R|kotlin/reflect/KClass<kotlin/String>|
|
||||
public final property javaClass(val): R|java/lang/Class<kotlin/String>| = STUB
|
||||
public get(): R|java/lang/Class<kotlin/String>|
|
||||
public final property kotlinClass(val): R|kotlin/reflect/KClass<kotlin/String>| = STUB
|
||||
public get(): R|kotlin/reflect/KClass<kotlin/String>|
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
FILE: treeSet.kt
|
||||
public? final? property x(val): R|java/util/SortedSet<kotlin/Int>| = STUB
|
||||
public? get(): R|java/util/SortedSet<kotlin/Int>|
|
||||
public final property x(val): R|java/util/SortedSet<kotlin/Int>| = STUB
|
||||
public get(): R|java/util/SortedSet<kotlin/Int>|
|
||||
|
||||
+6
-6
@@ -1,12 +1,12 @@
|
||||
FILE: typeAliasWithGeneric.kt
|
||||
public? open class A {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public open class A {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
<S, T : R|A|> public? abstract interface B {
|
||||
<S, T : R|A|> public abstract interface B {
|
||||
}
|
||||
public? final class D : R|C<A> = B<T, A>| {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final class D : R|C<A> = B<T, A>| {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
<T> public? final typealias C = R|B<T, A>|
|
||||
<T> public final typealias C = R|B<T, A>|
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: typeParameterInPropertyReceiver.kt
|
||||
<T : R|kotlin/Any|> public? final? property self R|T|.(val): R|T|
|
||||
public? get(): R|T| {
|
||||
<T : R|kotlin/Any|> public final property self R|T|.(val): R|T|
|
||||
public get(): R|T| {
|
||||
STUB
|
||||
}
|
||||
|
||||
+14
-14
@@ -1,27 +1,27 @@
|
||||
FILE: typeParameterVsNested.kt
|
||||
public? abstract interface Some {
|
||||
public abstract interface Some {
|
||||
}
|
||||
<T : R|test/Some|> public? abstract class My {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
<T : R|test/Some|> public abstract class My {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
public? final inner class T {
|
||||
public? constructor(): super<R|kotlin/Any|>()
|
||||
public final inner class T {
|
||||
public constructor(): super<R|kotlin/Any|>()
|
||||
|
||||
}
|
||||
|
||||
public? abstract property x(val): R|T|
|
||||
public? get(): R|T|
|
||||
public abstract property x(val): R|T|
|
||||
public get(): R|T|
|
||||
|
||||
public? abstract function foo(arg: R|T|): R|kotlin/Unit|
|
||||
public abstract function foo(arg: R|T|): R|kotlin/Unit|
|
||||
|
||||
public? abstract property y(val): R|test/My.T|
|
||||
public? get(): R|test/My.T|
|
||||
public abstract property y(val): R|test/My.T|
|
||||
public get(): R|test/My.T|
|
||||
|
||||
public? abstract property z(val): R|test/My.T|
|
||||
public? get(): R|test/My.T|
|
||||
public abstract property z(val): R|test/My.T|
|
||||
public get(): R|test/My.T|
|
||||
|
||||
public? final class Some : R|test/My.T| {
|
||||
public? constructor(): super<R|T|>()
|
||||
public final class Some : R|test/My.T| {
|
||||
public constructor(): super<R|T|>()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -106,8 +106,7 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
||||
|
||||
@TestMetadata("typeParameterInPropertyReceiver.kt")
|
||||
public void testTypeParameterInPropertyReceiver() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/fir/resolve/typeParameterInPropertyReceiver.kt");
|
||||
doTest(fileName);
|
||||
runTest("compiler/testData/fir/resolve/typeParameterInPropertyReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameterVsNested.kt")
|
||||
@@ -133,6 +132,44 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/fir/resolve/fromBuilder")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class FromBuilder extends AbstractFirResolveTestCase {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInFromBuilder() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/fir/resolve/fromBuilder"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complexTypes.kt")
|
||||
public void testComplexTypes() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/fromBuilder/complexTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enums.kt")
|
||||
public void testEnums() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/fromBuilder/enums.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noPrimaryConstructor.kt")
|
||||
public void testNoPrimaryConstructor() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/fromBuilder/noPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClass.kt")
|
||||
public void testSimpleClass() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/fromBuilder/simpleClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameters.kt")
|
||||
public void testTypeParameters() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/fromBuilder/typeParameters.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/fir/resolve/multifile")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
+1
-2
@@ -98,8 +98,7 @@ public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCas
|
||||
|
||||
@TestMetadata("noPrimaryConstructor.kt")
|
||||
public void testNoPrimaryConstructor() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/fir/rawBuilder/declarations/noPrimaryConstructor.kt");
|
||||
doRawFirTest(fileName);
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/noPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClass.kt")
|
||||
|
||||
Reference in New Issue
Block a user