Rework nullability in IR
This commit is contained in:
+1
-2
@@ -321,7 +321,6 @@ class Fir2IrImplicitCastInserter(
|
|||||||
internal fun implicitCastOrExpression(original: IrExpression, castType: IrType): IrExpression {
|
internal fun implicitCastOrExpression(original: IrExpression, castType: IrType): IrExpression {
|
||||||
val originalNotNull = original.type.makeNotNull()
|
val originalNotNull = original.type.makeNotNull()
|
||||||
if (originalNotNull == castType.makeNotNull()) return original
|
if (originalNotNull == castType.makeNotNull()) return original
|
||||||
if (castType is IrDefinitelyNotNullType && originalNotNull == castType.original.makeNotNull()) return original
|
|
||||||
return implicitCast(original, castType)
|
return implicitCast(original, castType)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +357,7 @@ class Fir2IrImplicitCastInserter(
|
|||||||
val classId = it.symbol.owner.parentAsClass.classId
|
val classId = it.symbol.owner.parentAsClass.classId
|
||||||
classId == StandardClassIds.Annotations.EnhancedNullability ||
|
classId == StandardClassIds.Annotations.EnhancedNullability ||
|
||||||
classId == StandardClassIds.Annotations.FlexibleNullability
|
classId == StandardClassIds.Annotations.FlexibleNullability
|
||||||
}.withHasQuestionMark(false)
|
}.makeNotNull()
|
||||||
return IrTypeOperatorCallImpl(
|
return IrTypeOperatorCallImpl(
|
||||||
original.startOffset,
|
original.startOffset,
|
||||||
original.endOffset,
|
original.endOffset,
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
|||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
import org.jetbrains.kotlin.ir.types.IrTypeArgument
|
import org.jetbrains.kotlin.ir.types.IrTypeArgument
|
||||||
import org.jetbrains.kotlin.ir.types.IrTypeProjection
|
import org.jetbrains.kotlin.ir.types.IrTypeProjection
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrDefinitelyNotNullTypeImpl
|
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrStarProjectionImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrStarProjectionImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
||||||
|
import org.jetbrains.kotlin.ir.types.makeNotNull
|
||||||
import org.jetbrains.kotlin.name.ClassId
|
import org.jetbrains.kotlin.name.ClassId
|
||||||
import org.jetbrains.kotlin.name.StandardClassIds
|
import org.jetbrains.kotlin.name.StandardClassIds
|
||||||
import org.jetbrains.kotlin.name.StandardClassIds.Annotations.ExtensionFunctionType
|
import org.jetbrains.kotlin.name.StandardClassIds.Annotations.ExtensionFunctionType
|
||||||
@@ -190,7 +190,7 @@ class Fir2IrTypeConverter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
is ConeDefinitelyNotNullType -> {
|
is ConeDefinitelyNotNullType -> {
|
||||||
IrDefinitelyNotNullTypeImpl(null, original.toIrType(typeContext))
|
original.toIrType(typeContext).makeNotNull()
|
||||||
}
|
}
|
||||||
is ConeIntersectionType -> {
|
is ConeIntersectionType -> {
|
||||||
// TODO: add intersectionTypeApproximation
|
// TODO: add intersectionTypeApproximation
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class IrBuiltInsOverFir(
|
|||||||
}
|
}
|
||||||
override val anyClass: IrClassSymbol get() = any.klass
|
override val anyClass: IrClassSymbol get() = any.klass
|
||||||
override val anyType: IrType get() = any.type
|
override val anyType: IrType get() = any.type
|
||||||
override val anyNType by lazy { anyType.withHasQuestionMark(true) }
|
override val anyNType by lazy { anyType.makeNullable() }
|
||||||
|
|
||||||
private val number by createClass(kotlinIrPackage, IdSignatureValues.number, build = { modality = Modality.ABSTRACT }) {
|
private val number by createClass(kotlinIrPackage, IdSignatureValues.number, build = { modality = Modality.ABSTRACT }) {
|
||||||
configureSuperTypes()
|
configureSuperTypes()
|
||||||
@@ -84,7 +84,7 @@ class IrBuiltInsOverFir(
|
|||||||
private val nothing by createClass(kotlinIrPackage, IdSignatureValues.nothing)
|
private val nothing by createClass(kotlinIrPackage, IdSignatureValues.nothing)
|
||||||
override val nothingClass: IrClassSymbol get() = nothing.klass
|
override val nothingClass: IrClassSymbol get() = nothing.klass
|
||||||
override val nothingType: IrType get() = nothing.type
|
override val nothingType: IrType get() = nothing.type
|
||||||
override val nothingNType: IrType by lazy { nothingType.withHasQuestionMark(true) }
|
override val nothingNType: IrType by lazy { nothingType.makeNullable() }
|
||||||
|
|
||||||
private val unit by createClass(kotlinIrPackage, IdSignatureValues.unit, build = { kind = ClassKind.OBJECT; modality = Modality.FINAL })
|
private val unit by createClass(kotlinIrPackage, IdSignatureValues.unit, build = { kind = ClassKind.OBJECT; modality = Modality.FINAL })
|
||||||
override val unitClass: IrClassSymbol get() = unit.klass
|
override val unitClass: IrClassSymbol get() = unit.klass
|
||||||
@@ -401,7 +401,7 @@ class IrBuiltInsOverFir(
|
|||||||
|
|
||||||
createFunction(
|
createFunction(
|
||||||
fqName, "CHECK_NOT_NULL",
|
fqName, "CHECK_NOT_NULL",
|
||||||
IrSimpleTypeImpl(typeParameter.symbol, hasQuestionMark = false, emptyList(), emptyList()),
|
IrSimpleTypeImpl(typeParameter.symbol, SimpleTypeNullability.DEFINITELY_NOT_NULL, emptyList(), emptyList()),
|
||||||
arrayOf("" to IrSimpleTypeImpl(typeParameter.symbol, hasQuestionMark = true, emptyList(), emptyList())),
|
arrayOf("" to IrSimpleTypeImpl(typeParameter.symbol, hasQuestionMark = true, emptyList(), emptyList())),
|
||||||
origin = BUILTIN_OPERATOR
|
origin = BUILTIN_OPERATOR
|
||||||
).also {
|
).also {
|
||||||
@@ -471,7 +471,7 @@ class IrBuiltInsOverFir(
|
|||||||
override val extensionStringPlus: IrSimpleFunctionSymbol by lazy {
|
override val extensionStringPlus: IrSimpleFunctionSymbol by lazy {
|
||||||
findFunctions(kotlinPackage, OperatorNameConventions.PLUS).single { function ->
|
findFunctions(kotlinPackage, OperatorNameConventions.PLUS).single { function ->
|
||||||
val isStringExtension =
|
val isStringExtension =
|
||||||
function.owner.extensionReceiverParameter?.let { receiver -> receiver.type == stringType.withHasQuestionMark(true) }
|
function.owner.extensionReceiverParameter?.let { receiver -> receiver.type == stringType.makeNullable() }
|
||||||
?: false
|
?: false
|
||||||
isStringExtension && function.owner.valueParameters.size == 1 && function.owner.valueParameters[0].type == anyNType
|
isStringExtension && function.owner.valueParameters.size == 1 && function.owner.valueParameters[0].type == anyNType
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -359,7 +359,7 @@ internal class AdapterGenerator(
|
|||||||
reifiedVarargElementType = adaptedType.getArgumentTypeAt(index)
|
reifiedVarargElementType = adaptedType.getArgumentTypeAt(index)
|
||||||
reifiedVarargType = IrSimpleTypeImpl(
|
reifiedVarargType = IrSimpleTypeImpl(
|
||||||
parameterType.classifier,
|
parameterType.classifier,
|
||||||
parameterType.hasQuestionMark,
|
parameterType.nullability,
|
||||||
listOf(makeTypeProjection(reifiedVarargElementType, Variance.OUT_VARIANCE)),
|
listOf(makeTypeProjection(reifiedVarargElementType, Variance.OUT_VARIANCE)),
|
||||||
parameterType.annotations,
|
parameterType.annotations,
|
||||||
parameterType.abbreviation
|
parameterType.abbreviation
|
||||||
|
|||||||
+5
-12
@@ -18,10 +18,8 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl
|
|||||||
import org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl
|
import org.jetbrains.kotlin.ir.expressions.impl.IrTypeOperatorCallImpl
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.IrSimpleType
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||||
import org.jetbrains.kotlin.ir.types.isDoubleOrFloatWithoutNullability
|
|
||||||
import org.jetbrains.kotlin.ir.util.getSimpleFunction
|
import org.jetbrains.kotlin.ir.util.getSimpleFunction
|
||||||
|
|
||||||
internal class OperatorExpressionGenerator(
|
internal class OperatorExpressionGenerator(
|
||||||
@@ -173,19 +171,14 @@ internal class OperatorExpressionGenerator(
|
|||||||
if (noImplicitCast && !isDoubleOrFloatWithoutNullability && irExpression.operator == IrTypeOperator.IMPLICIT_CAST) {
|
if (noImplicitCast && !isDoubleOrFloatWithoutNullability && irExpression.operator == IrTypeOperator.IMPLICIT_CAST) {
|
||||||
return irExpression.argument
|
return irExpression.argument
|
||||||
} else {
|
} else {
|
||||||
val simpleType = irExpression.type as? IrSimpleType
|
val expressionType = irExpression.type
|
||||||
if (isDoubleOrFloatWithoutNullability &&
|
if (isDoubleOrFloatWithoutNullability &&
|
||||||
isOriginalNullable &&
|
isOriginalNullable &&
|
||||||
simpleType?.hasQuestionMark == false
|
expressionType is IrSimpleType &&
|
||||||
|
!expressionType.isNullable()
|
||||||
) {
|
) {
|
||||||
// Make it compatible with IR lowering
|
// Make it compatible with IR lowering
|
||||||
val nullableDoubleOrFloatType = IrSimpleTypeImpl(
|
val nullableDoubleOrFloatType = expressionType.makeNullable()
|
||||||
simpleType.classifier,
|
|
||||||
true,
|
|
||||||
simpleType.arguments,
|
|
||||||
simpleType.annotations,
|
|
||||||
simpleType.abbreviation
|
|
||||||
)
|
|
||||||
return IrTypeOperatorCallImpl(
|
return IrTypeOperatorCallImpl(
|
||||||
irExpression.startOffset,
|
irExpression.startOffset,
|
||||||
irExpression.endOffset,
|
irExpression.endOffset,
|
||||||
|
|||||||
@@ -329,13 +329,13 @@ fun IrType.remapTypeParameters(
|
|||||||
target.typeParameters[classifier.index]
|
target.typeParameters[classifier.index]
|
||||||
else
|
else
|
||||||
classifier
|
classifier
|
||||||
IrSimpleTypeImpl(newClassifier.symbol, hasQuestionMark, arguments, annotations)
|
IrSimpleTypeImpl(newClassifier.symbol, nullability, arguments, annotations)
|
||||||
}
|
}
|
||||||
|
|
||||||
classifier is IrClass ->
|
classifier is IrClass ->
|
||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
classifier.symbol,
|
classifier.symbol,
|
||||||
hasQuestionMark,
|
nullability,
|
||||||
arguments.map {
|
arguments.map {
|
||||||
when (it) {
|
when (it) {
|
||||||
is IrTypeProjection -> makeTypeProjection(
|
is IrTypeProjection -> makeTypeProjection(
|
||||||
|
|||||||
+1
-1
@@ -335,7 +335,7 @@ abstract class AbstractSuspendFunctionsLowering<C : CommonBackendContext>(val co
|
|||||||
val constructor = coroutine.coroutineConstructor
|
val constructor = coroutine.coroutineConstructor
|
||||||
generateCoroutineStart(coroutine.stateMachineFunction,
|
generateCoroutineStart(coroutine.stateMachineFunction,
|
||||||
irCallConstructor(constructor.symbol, irFunction.typeParameters.map {
|
irCallConstructor(constructor.symbol, irFunction.typeParameters.map {
|
||||||
IrSimpleTypeImpl(it.symbol, true, emptyList(), emptyList())
|
it.defaultType.makeNullable()
|
||||||
}).apply {
|
}).apply {
|
||||||
val functionParameters = irFunction.explicitParameters
|
val functionParameters = irFunction.explicitParameters
|
||||||
functionParameters.forEachIndexed { index, argument ->
|
functionParameters.forEachIndexed { index, argument ->
|
||||||
|
|||||||
+2
-1
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.ir.builders.*
|
|||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.expressions.*
|
import org.jetbrains.kotlin.ir.expressions.*
|
||||||
import org.jetbrains.kotlin.ir.transformStatement
|
import org.jetbrains.kotlin.ir.transformStatement
|
||||||
|
import org.jetbrains.kotlin.ir.types.SimpleTypeNullability
|
||||||
import org.jetbrains.kotlin.ir.types.extractTypeParameters
|
import org.jetbrains.kotlin.ir.types.extractTypeParameters
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.*
|
||||||
@@ -293,7 +294,7 @@ class InlineClassLowering(val context: CommonBackendContext) {
|
|||||||
|
|
||||||
val typeParameters = extractTypeParameters(function.parentAsClass) + function.typeParameters
|
val typeParameters = extractTypeParameters(function.parentAsClass) + function.typeParameters
|
||||||
for ((index, typeParameter) in typeParameters.withIndex()) {
|
for ((index, typeParameter) in typeParameters.withIndex()) {
|
||||||
putTypeArgument(index, IrSimpleTypeImpl(typeParameter.symbol, false, emptyList(), emptyList()))
|
putTypeArgument(index, IrSimpleTypeImpl(typeParameter.symbol, SimpleTypeNullability.NOT_SPECIFIED, emptyList(), emptyList()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
+2
-5
@@ -98,16 +98,13 @@ internal class DeepCopyIrTreeWithSymbolsForInliner(
|
|||||||
|
|
||||||
erasedParameters.remove(classifier)
|
erasedParameters.remove(classifier)
|
||||||
|
|
||||||
return if (type.hasQuestionMark) erasedUpperBound.makeNullable() else erasedUpperBound
|
return erasedUpperBound.mergeNullability(type)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substitutedType is IrDynamicType) return substitutedType
|
if (substitutedType is IrDynamicType) return substitutedType
|
||||||
|
|
||||||
if (substitutedType is IrSimpleType) {
|
if (substitutedType is IrSimpleType) {
|
||||||
return substitutedType.buildSimpleType {
|
return substitutedType.mergeNullability(type)
|
||||||
kotlinType = null
|
|
||||||
hasQuestionMark = type.hasQuestionMark or substitutedType.isMarkedNullable()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return type.buildSimpleType {
|
return type.buildSimpleType {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrGetObjectValueImpl
|
|||||||
import org.jetbrains.kotlin.ir.expressions.impl.IrWhileLoopImpl
|
import org.jetbrains.kotlin.ir.expressions.impl.IrWhileLoopImpl
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
|
import org.jetbrains.kotlin.ir.types.SimpleTypeNullability
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ fun IrBuilderWithScope.irContinue(loop: IrLoop) =
|
|||||||
IrContinueImpl(startOffset, endOffset, context.irBuiltIns.nothingType, loop)
|
IrContinueImpl(startOffset, endOffset, context.irBuiltIns.nothingType, loop)
|
||||||
|
|
||||||
fun IrBuilderWithScope.irGetObject(classSymbol: IrClassSymbol) =
|
fun IrBuilderWithScope.irGetObject(classSymbol: IrClassSymbol) =
|
||||||
IrGetObjectValueImpl(startOffset, endOffset, IrSimpleTypeImpl(classSymbol, false, emptyList(), emptyList()), classSymbol)
|
IrGetObjectValueImpl(startOffset, endOffset, IrSimpleTypeImpl(classSymbol, SimpleTypeNullability.NOT_SPECIFIED, emptyList(), emptyList()), classSymbol)
|
||||||
|
|
||||||
// Also adds created variable into building block
|
// Also adds created variable into building block
|
||||||
fun <T : IrElement> IrStatementsBuilder<T>.createTmpVariable(
|
fun <T : IrElement> IrStatementsBuilder<T>.createTmpVariable(
|
||||||
|
|||||||
@@ -95,10 +95,7 @@ fun IrType.substitute(substitutionMap: Map<IrTypeParameterSymbol, IrType>): IrTy
|
|||||||
substitutionMap[classifier]?.let { substitutedType ->
|
substitutionMap[classifier]?.let { substitutedType ->
|
||||||
// Add nullability and annotations from original type
|
// Add nullability and annotations from original type
|
||||||
return substitutedType
|
return substitutedType
|
||||||
.withHasQuestionMark(
|
.mergeNullability(this)
|
||||||
hasQuestionMark ||
|
|
||||||
substitutedType is IrSimpleType && substitutedType.hasQuestionMark
|
|
||||||
)
|
|
||||||
.addAnnotations(newAnnotations)
|
.addAnnotations(newAnnotations)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +109,7 @@ fun IrType.substitute(substitutionMap: Map<IrTypeParameterSymbol, IrType>): IrTy
|
|||||||
|
|
||||||
return IrSimpleTypeImpl(
|
return IrSimpleTypeImpl(
|
||||||
classifier,
|
classifier,
|
||||||
hasQuestionMark,
|
nullability,
|
||||||
newArguments,
|
newArguments,
|
||||||
newAnnotations
|
newAnnotations
|
||||||
)
|
)
|
||||||
|
|||||||
+2
-2
@@ -469,7 +469,7 @@ class ExportModelGenerator(
|
|||||||
return ExportedType.ErrorType("NonSimpleType ${type.render()}")
|
return ExportedType.ErrorType("NonSimpleType ${type.render()}")
|
||||||
|
|
||||||
val classifier = type.classifier
|
val classifier = type.classifier
|
||||||
val isNullable = type.hasQuestionMark
|
val isMarkedNullable = type.isMarkedNullable()
|
||||||
val nonNullType = type.makeNotNull() as IrSimpleType
|
val nonNullType = type.makeNotNull() as IrSimpleType
|
||||||
|
|
||||||
val exportedType = when {
|
val exportedType = when {
|
||||||
@@ -528,7 +528,7 @@ class ExportModelGenerator(
|
|||||||
else -> error("Unexpected classifier $classifier")
|
else -> error("Unexpected classifier $classifier")
|
||||||
}
|
}
|
||||||
|
|
||||||
return exportedType.withNullability(isNullable)
|
return exportedType.withNullability(isMarkedNullable)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun IrClass.getExportableName(): String {
|
private fun IrClass.getExportableName(): String {
|
||||||
|
|||||||
+2
-2
@@ -74,7 +74,7 @@ class ScriptRemoveReceiverLowering(val context: CommonBackendContext) : FileLowe
|
|||||||
endOffset,
|
endOffset,
|
||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
context.ir.symbols.functionN(newN),
|
context.ir.symbols.functionN(newN),
|
||||||
(type as IrSimpleType).hasQuestionMark,
|
(type as IrSimpleType).nullability,
|
||||||
arguments,
|
arguments,
|
||||||
type.annotations
|
type.annotations
|
||||||
),
|
),
|
||||||
@@ -111,7 +111,7 @@ class ScriptRemoveReceiverLowering(val context: CommonBackendContext) : FileLowe
|
|||||||
endOffset,
|
endOffset,
|
||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
(if (setter == null) getPropertyN(newN) else getMutablePropertyN(newN)),
|
(if (setter == null) getPropertyN(newN) else getMutablePropertyN(newN)),
|
||||||
(type as IrSimpleType).hasQuestionMark,
|
(type as IrSimpleType).nullability,
|
||||||
arguments,
|
arguments,
|
||||||
type.annotations
|
type.annotations
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import org.jetbrains.kotlin.ir.symbols.IrScriptSymbol
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
||||||
import org.jetbrains.kotlin.ir.util.getInlineClassUnderlyingType
|
|
||||||
import org.jetbrains.kotlin.ir.util.isEffectivelyExternal
|
import org.jetbrains.kotlin.ir.util.isEffectivelyExternal
|
||||||
import org.jetbrains.kotlin.js.backend.ast.JsNameRef
|
import org.jetbrains.kotlin.js.backend.ast.JsNameRef
|
||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
@@ -26,7 +25,11 @@ fun IrType.asString(): String = when (this) {
|
|||||||
is IrDynamicType -> "dynamic"
|
is IrDynamicType -> "dynamic"
|
||||||
is IrSimpleType ->
|
is IrSimpleType ->
|
||||||
classifier.asString() +
|
classifier.asString() +
|
||||||
(if (hasQuestionMark) "?" else "") +
|
when (nullability) {
|
||||||
|
SimpleTypeNullability.MARKED_NULLABLE -> "?"
|
||||||
|
SimpleTypeNullability.NOT_SPECIFIED -> ""
|
||||||
|
SimpleTypeNullability.DEFINITELY_NOT_NULL -> if (classifier is IrTypeParameterSymbol) " & Any" else ""
|
||||||
|
} +
|
||||||
(arguments.ifNotEmpty {
|
(arguments.ifNotEmpty {
|
||||||
joinToString(separator = ",", prefix = "<", postfix = ">") { it.asString() }
|
joinToString(separator = ",", prefix = "<", postfix = ">") { it.asString() }
|
||||||
} ?: "")
|
} ?: "")
|
||||||
|
|||||||
+5
-8
@@ -34,11 +34,8 @@ private val IrTypeParameter.erasedUpperBound: IrClass?
|
|||||||
|
|
||||||
val IrType.erasedUpperBound: IrClass?
|
val IrType.erasedUpperBound: IrClass?
|
||||||
get() =
|
get() =
|
||||||
if (this is IrDefinitelyNotNullType)
|
when (val classifier = classifierOrNull) {
|
||||||
this.original.erasedUpperBound
|
is IrClassSymbol -> classifier.owner
|
||||||
else
|
is IrTypeParameterSymbol -> classifier.owner.erasedUpperBound
|
||||||
when (val classifier = classifierOrNull) {
|
else -> throw IllegalStateException()
|
||||||
is IrClassSymbol -> classifier.owner
|
}
|
||||||
is IrTypeParameterSymbol -> classifier.owner.erasedUpperBound
|
|
||||||
else -> throw IllegalStateException()
|
|
||||||
}
|
|
||||||
+1
-1
@@ -80,7 +80,7 @@ private fun JvmIrBuilder.normalizeArgument(expression: IrExpression): IrExpressi
|
|||||||
// upcast to 'String?'
|
// upcast to 'String?'
|
||||||
return irImplicitCast(expression, context.irBuiltIns.stringType.makeNullable())
|
return irImplicitCast(expression, context.irBuiltIns.stringType.makeNullable())
|
||||||
}
|
}
|
||||||
if (type is IrSimpleType && !type.hasQuestionMark || type is IrDefinitelyNotNullType) {
|
if (!type.isNullable()) {
|
||||||
if (upperBound.isByte() || upperBound.isShort()) {
|
if (upperBound.isByte() || upperBound.isShort()) {
|
||||||
// Expression type is not null,
|
// Expression type is not null,
|
||||||
// T <: Byte || T <: Short =>
|
// T <: Byte || T <: Short =>
|
||||||
|
|||||||
+2
-4
@@ -548,9 +548,7 @@ internal class LambdaMetafactoryArgumentsBuilder(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun computeParameterTypeAdaptationConstraint(adapteeType0: IrType, expectedType0: IrType): TypeAdaptationConstraint? {
|
private fun computeParameterTypeAdaptationConstraint(adapteeType: IrType, expectedType: IrType): TypeAdaptationConstraint? {
|
||||||
val adapteeType = adapteeType0.unwrapDefinitelyNotNullType()
|
|
||||||
val expectedType = expectedType0.unwrapDefinitelyNotNullType()
|
|
||||||
if (adapteeType !is IrSimpleType)
|
if (adapteeType !is IrSimpleType)
|
||||||
throw AssertionError("Simple type expected: ${adapteeType.render()}")
|
throw AssertionError("Simple type expected: ${adapteeType.render()}")
|
||||||
if (expectedType !is IrSimpleType)
|
if (expectedType !is IrSimpleType)
|
||||||
@@ -582,7 +580,7 @@ internal class LambdaMetafactoryArgumentsBuilder(
|
|||||||
// Inline classes mapped to non-null reference types are a special case because they can't be boxed trivially.
|
// Inline classes mapped to non-null reference types are a special case because they can't be boxed trivially.
|
||||||
// TODO consider adding a special type annotation to force boxing on an inline class type regardless of its underlying type.
|
// TODO consider adding a special type annotation to force boxing on an inline class type regardless of its underlying type.
|
||||||
val underlyingAdapteeType = getInlineClassUnderlyingType(erasedAdapteeClass)
|
val underlyingAdapteeType = getInlineClassUnderlyingType(erasedAdapteeClass)
|
||||||
if (!underlyingAdapteeType.hasQuestionMark && !underlyingAdapteeType.isPrimitiveType()) {
|
if (!underlyingAdapteeType.isNullable() && !underlyingAdapteeType.isPrimitiveType()) {
|
||||||
return TypeAdaptationConstraint.CONFLICT
|
return TypeAdaptationConstraint.CONFLICT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.ir.IrBuiltIns
|
|||||||
import org.jetbrains.kotlin.ir.types.IrSimpleType
|
import org.jetbrains.kotlin.ir.types.IrSimpleType
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
import org.jetbrains.kotlin.ir.types.IrTypeSystemContext
|
import org.jetbrains.kotlin.ir.types.IrTypeSystemContext
|
||||||
|
import org.jetbrains.kotlin.ir.types.isMarkedNullable as irIsMarkedNullable
|
||||||
import org.jetbrains.kotlin.types.model.FlexibleTypeMarker
|
import org.jetbrains.kotlin.types.model.FlexibleTypeMarker
|
||||||
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
|
import org.jetbrains.kotlin.types.model.KotlinTypeMarker
|
||||||
import org.jetbrains.kotlin.types.model.SimpleTypeMarker
|
import org.jetbrains.kotlin.types.model.SimpleTypeMarker
|
||||||
@@ -35,5 +36,5 @@ class JvmIrTypeSystemContext(override val irBuiltIns: IrBuiltIns) : IrTypeSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun KotlinTypeMarker.isMarkedNullable(): Boolean =
|
override fun KotlinTypeMarker.isMarkedNullable(): Boolean =
|
||||||
this is IrSimpleType && !isWithFlexibleNullability() && hasQuestionMark
|
this is IrSimpleType && !isWithFlexibleNullability() && irIsMarkedNullable()
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -158,7 +158,7 @@ class MemoizedInlineClassReplacements(
|
|||||||
parent = irClass
|
parent = irClass
|
||||||
// We ignore type arguments here, since there is no good way to go from type arguments to types in the IR anyway.
|
// We ignore type arguments here, since there is no good way to go from type arguments to types in the IR anyway.
|
||||||
val typeArgument =
|
val typeArgument =
|
||||||
IrSimpleTypeImpl(null, irClass.symbol, false, List(irClass.typeParameters.size) { IrStarProjectionImpl }, listOf())
|
IrSimpleTypeImpl(irClass.symbol, false, List(irClass.typeParameters.size) { IrStarProjectionImpl }, listOf())
|
||||||
addValueParameter {
|
addValueParameter {
|
||||||
name = InlineClassDescriptorResolver.SPECIALIZED_EQUALS_FIRST_PARAMETER_NAME
|
name = InlineClassDescriptorResolver.SPECIALIZED_EQUALS_FIRST_PARAMETER_NAME
|
||||||
type = typeArgument
|
type = typeArgument
|
||||||
|
|||||||
+3
-6
@@ -9,12 +9,9 @@ import org.jetbrains.kotlin.backend.jvm.JvmSymbols
|
|||||||
import org.jetbrains.kotlin.builtins.StandardNames
|
import org.jetbrains.kotlin.builtins.StandardNames
|
||||||
import org.jetbrains.kotlin.ir.IrBuiltIns
|
import org.jetbrains.kotlin.ir.IrBuiltIns
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||||
import org.jetbrains.kotlin.ir.types.IrSimpleType
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
|
||||||
import org.jetbrains.kotlin.ir.types.classFqName
|
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrStarProjectionImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrStarProjectionImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.buildSimpleType
|
import org.jetbrains.kotlin.ir.types.impl.buildSimpleType
|
||||||
import org.jetbrains.kotlin.ir.types.removeAnnotations
|
|
||||||
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
||||||
import org.jetbrains.kotlin.ir.util.hasAnnotation
|
import org.jetbrains.kotlin.ir.util.hasAnnotation
|
||||||
import org.jetbrains.kotlin.ir.util.render
|
import org.jetbrains.kotlin.ir.util.render
|
||||||
@@ -35,7 +32,7 @@ private class IrJvmFlexibleTypeImpl(
|
|||||||
) : IrJvmFlexibleType {
|
) : IrJvmFlexibleType {
|
||||||
override val lowerBound: IrSimpleType
|
override val lowerBound: IrSimpleType
|
||||||
get() = irType.buildSimpleType {
|
get() = irType.buildSimpleType {
|
||||||
if (nullability) hasQuestionMark = false
|
if (this@IrJvmFlexibleTypeImpl.nullability) nullability = SimpleTypeNullability.NOT_SPECIFIED
|
||||||
// No change in classifier is needed for mutability because type's classifier is set to the lower bound anyway
|
// No change in classifier is needed for mutability because type's classifier is set to the lower bound anyway
|
||||||
// (see TypeTranslator.translateType).
|
// (see TypeTranslator.translateType).
|
||||||
kotlinType = null
|
kotlinType = null
|
||||||
@@ -43,7 +40,7 @@ private class IrJvmFlexibleTypeImpl(
|
|||||||
|
|
||||||
override val upperBound: IrSimpleType
|
override val upperBound: IrSimpleType
|
||||||
get() = irType.buildSimpleType {
|
get() = irType.buildSimpleType {
|
||||||
if (nullability) hasQuestionMark = true
|
if (this@IrJvmFlexibleTypeImpl.nullability) nullability = SimpleTypeNullability.MARKED_NULLABLE
|
||||||
if (mutability) {
|
if (mutability) {
|
||||||
val klass = classifier?.owner as? IrClass
|
val klass = classifier?.owner as? IrClass
|
||||||
?: error("Mutability-flexible type's classifier is not a class: ${irType.render()}")
|
?: error("Mutability-flexible type's classifier is not a class: ${irType.render()}")
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import org.jetbrains.kotlin.ir.types.*
|
|||||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrStarProjectionImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrStarProjectionImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
||||||
import org.jetbrains.kotlin.ir.util.defaultType
|
|
||||||
import org.jetbrains.kotlin.ir.util.isLocal
|
import org.jetbrains.kotlin.ir.util.isLocal
|
||||||
import org.jetbrains.kotlin.ir.util.render
|
import org.jetbrains.kotlin.ir.util.render
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||||
@@ -41,9 +40,9 @@ fun IrType.eraseTypeParameters(): IrType = when (this) {
|
|||||||
when (val owner = classifier.owner) {
|
when (val owner = classifier.owner) {
|
||||||
is IrScript -> {
|
is IrScript -> {
|
||||||
assert(arguments.isEmpty()) { "Script can't be generic: " + owner.render() }
|
assert(arguments.isEmpty()) { "Script can't be generic: " + owner.render() }
|
||||||
IrSimpleTypeImpl(classifier, hasQuestionMark, emptyList(), annotations)
|
IrSimpleTypeImpl(classifier, nullability, emptyList(), annotations)
|
||||||
}
|
}
|
||||||
is IrClass -> IrSimpleTypeImpl(classifier, hasQuestionMark, arguments.map { it.eraseTypeParameters() }, annotations)
|
is IrClass -> IrSimpleTypeImpl(classifier, nullability, arguments.map { it.eraseTypeParameters() }, annotations)
|
||||||
is IrTypeParameter -> {
|
is IrTypeParameter -> {
|
||||||
val upperBound = owner.erasedUpperBound
|
val upperBound = owner.erasedUpperBound
|
||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
@@ -56,8 +55,6 @@ fun IrType.eraseTypeParameters(): IrType = when (this) {
|
|||||||
}
|
}
|
||||||
else -> error("Unknown IrSimpleType classifier kind: $owner")
|
else -> error("Unknown IrSimpleType classifier kind: $owner")
|
||||||
}
|
}
|
||||||
is IrDefinitelyNotNullType ->
|
|
||||||
this.original.eraseTypeParameters()
|
|
||||||
is IrErrorType ->
|
is IrErrorType ->
|
||||||
this
|
this
|
||||||
else -> error("Unknown IrType kind: $this")
|
else -> error("Unknown IrType kind: $this")
|
||||||
@@ -88,15 +85,12 @@ val IrTypeParameter.erasedUpperBound: IrClass
|
|||||||
|
|
||||||
val IrType.erasedUpperBound: IrClass
|
val IrType.erasedUpperBound: IrClass
|
||||||
get() =
|
get() =
|
||||||
if (this is IrDefinitelyNotNullType)
|
when (val classifier = classifierOrNull) {
|
||||||
this.original.erasedUpperBound
|
is IrClassSymbol -> classifier.owner
|
||||||
else
|
is IrTypeParameterSymbol -> classifier.owner.erasedUpperBound
|
||||||
when (val classifier = classifierOrNull) {
|
is IrScriptSymbol -> classifier.owner.targetClass!!.owner
|
||||||
is IrClassSymbol -> classifier.owner
|
else -> error(render())
|
||||||
is IrTypeParameterSymbol -> classifier.owner.erasedUpperBound
|
}
|
||||||
is IrScriptSymbol -> classifier.owner.targetClass!!.owner
|
|
||||||
else -> error(render())
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the default null/0 value for the type.
|
* Get the default null/0 value for the type.
|
||||||
@@ -111,7 +105,7 @@ fun IrType.defaultValue(startOffset: Int, endOffset: Int, context: JvmBackendCon
|
|||||||
return classifier.owner.representativeUpperBound.defaultValue(startOffset, endOffset, context)
|
return classifier.owner.representativeUpperBound.defaultValue(startOffset, endOffset, context)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this !is IrSimpleType || hasQuestionMark || classOrNull?.owner?.isSingleFieldValueClass != true)
|
if (this !is IrSimpleType || this.isMarkedNullable() || classOrNull?.owner?.isSingleFieldValueClass != true)
|
||||||
return IrConstImpl.defaultValueForType(startOffset, endOffset, this)
|
return IrConstImpl.defaultValueForType(startOffset, endOffset, this)
|
||||||
|
|
||||||
val underlyingType = unboxInlineClass()
|
val underlyingType = unboxInlineClass()
|
||||||
@@ -137,13 +131,13 @@ fun IrType.eraseToScope(visibleTypeParameters: Set<IrTypeParameter>): IrType {
|
|||||||
return when (classifier) {
|
return when (classifier) {
|
||||||
is IrClassSymbol ->
|
is IrClassSymbol ->
|
||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
classifier, hasQuestionMark, arguments.map { it.eraseToScope(visibleTypeParameters) }, annotations
|
classifier, nullability, arguments.map { it.eraseToScope(visibleTypeParameters) }, annotations
|
||||||
)
|
)
|
||||||
is IrTypeParameterSymbol ->
|
is IrTypeParameterSymbol ->
|
||||||
if (classifier.owner in visibleTypeParameters)
|
if (classifier.owner in visibleTypeParameters)
|
||||||
this
|
this
|
||||||
else
|
else
|
||||||
upperBound.withHasQuestionMark(this.hasQuestionMark)
|
upperBound.mergeNullability(this)
|
||||||
else -> error("unknown IrType classifier kind: ${classifier.owner.render()}")
|
else -> error("unknown IrType classifier kind: ${classifier.owner.render()}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,7 +194,11 @@ internal fun IrFunction.getArgsForMethodInvocation(
|
|||||||
|
|
||||||
internal fun IrType.getOnlyName(): String {
|
internal fun IrType.getOnlyName(): String {
|
||||||
if (this !is IrSimpleType) return this.render()
|
if (this !is IrSimpleType) return this.render()
|
||||||
return (this.classifierOrFail.owner as IrDeclarationWithName).name.asString() + (if (this.hasQuestionMark) "?" else "")
|
return (this.classifierOrFail.owner as IrDeclarationWithName).name.asString() + when (nullability) {
|
||||||
|
SimpleTypeNullability.MARKED_NULLABLE -> "?"
|
||||||
|
SimpleTypeNullability.NOT_SPECIFIED -> ""
|
||||||
|
SimpleTypeNullability.DEFINITELY_NOT_NULL -> if (this.classifierOrNull is IrTypeParameterSymbol) " & Any" else ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun IrFieldAccessExpression.accessesTopLevelOrObjectField(): Boolean {
|
internal fun IrFieldAccessExpression.accessesTopLevelOrObjectField(): Boolean {
|
||||||
@@ -251,7 +255,7 @@ internal fun IrType.getTypeIfReified(getType: (IrClassifierSymbol) -> IrType): I
|
|||||||
val owner = this.classifierOrNull?.owner
|
val owner = this.classifierOrNull?.owner
|
||||||
if (owner is IrTypeParameter && owner.isReified) {
|
if (owner is IrTypeParameter && owner.isReified) {
|
||||||
return (getType(owner.symbol) as IrSimpleType)
|
return (getType(owner.symbol) as IrSimpleType)
|
||||||
.buildSimpleType { hasQuestionMark = this.hasQuestionMark || this@getTypeIfReified.hasQuestionMark }
|
.mergeNullability(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
val newArguments = this.arguments.map {
|
val newArguments = this.arguments.map {
|
||||||
@@ -261,7 +265,6 @@ internal fun IrType.getTypeIfReified(getType: (IrClassifierSymbol) -> IrType): I
|
|||||||
type.getTypeIfReified(getType) as IrTypeArgument
|
type.getTypeIfReified(getType) as IrTypeArgument
|
||||||
}
|
}
|
||||||
return this.buildSimpleType {
|
return this.buildSimpleType {
|
||||||
hasQuestionMark = this.hasQuestionMark || this@getTypeIfReified.hasQuestionMark
|
|
||||||
arguments = newArguments
|
arguments = newArguments
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ internal class Wrapper(val value: Any, override val irClass: IrClass, environmen
|
|||||||
|
|
||||||
fun getStaticGetter(field: IrField): MethodHandle {
|
fun getStaticGetter(field: IrField): MethodHandle {
|
||||||
val jvmClass = field.parentAsClass.defaultType.getClass(true)
|
val jvmClass = field.parentAsClass.defaultType.getClass(true)
|
||||||
val returnType = field.type.let { it.getClass((it as IrSimpleType).hasQuestionMark) }
|
val returnType = field.type.let { it.getClass(it.isNullable()) }
|
||||||
return MethodHandles.lookup().findStaticGetter(jvmClass, field.name.asString(), returnType)
|
return MethodHandles.lookup().findStaticGetter(jvmClass, field.name.asString(), returnType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1131,12 +1131,13 @@ private fun getContainingDeclaration(declaration: IrDeclaration): DeclarationDes
|
|||||||
|
|
||||||
fun IrType.toIrBasedKotlinType(): KotlinType = when (this) {
|
fun IrType.toIrBasedKotlinType(): KotlinType = when (this) {
|
||||||
is IrSimpleType ->
|
is IrSimpleType ->
|
||||||
makeKotlinType(classifier, arguments, hasQuestionMark)
|
makeKotlinType(classifier, arguments, isMarkedNullable()).let {
|
||||||
is IrDefinitelyNotNullType -> {
|
if (classifier is IrTypeParameterSymbol && nullability == SimpleTypeNullability.DEFINITELY_NOT_NULL) {
|
||||||
val kotlinType = this.original.toIrBasedKotlinType()
|
DefinitelyNotNullType.makeDefinitelyNotNull(it.unwrap()) ?: it
|
||||||
DefinitelyNotNullType.makeDefinitelyNotNull(kotlinType.unwrap())
|
} else {
|
||||||
?: kotlinType
|
it
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else ->
|
else ->
|
||||||
throw AssertionError("Unexpected type: $this = ${this.render()}")
|
throw AssertionError("Unexpected type: $this = ${this.render()}")
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-5
@@ -26,7 +26,6 @@ import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.impl.IrTypeParameterSymbolImpl
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.impl.IrValueParameterSymbolImpl
|
import org.jetbrains.kotlin.ir.symbols.impl.IrValueParameterSymbolImpl
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeBuilder
|
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeBuilder
|
||||||
@@ -186,14 +185,14 @@ class IrBuiltInsOverDescriptors(
|
|||||||
val returnIrType = IrSimpleTypeBuilder().run {
|
val returnIrType = IrSimpleTypeBuilder().run {
|
||||||
classifier = typeParameterSymbol
|
classifier = typeParameterSymbol
|
||||||
kotlinType = returnKotlinType
|
kotlinType = returnKotlinType
|
||||||
hasQuestionMark = false
|
nullability = SimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
buildSimpleType()
|
buildSimpleType()
|
||||||
}
|
}
|
||||||
|
|
||||||
val valueIrType = IrSimpleTypeBuilder().run {
|
val valueIrType = IrSimpleTypeBuilder().run {
|
||||||
classifier = typeParameterSymbol
|
classifier = typeParameterSymbol
|
||||||
kotlinType = valueKotlinType
|
kotlinType = valueKotlinType
|
||||||
hasQuestionMark = true
|
nullability = SimpleTypeNullability.MARKED_NULLABLE
|
||||||
buildSimpleType()
|
buildSimpleType()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +231,7 @@ class IrBuiltInsOverDescriptors(
|
|||||||
val any = builtIns.anyType
|
val any = builtIns.anyType
|
||||||
override val anyType = any.toIrType()
|
override val anyType = any.toIrType()
|
||||||
override val anyClass = builtIns.any.toIrSymbol()
|
override val anyClass = builtIns.any.toIrSymbol()
|
||||||
override val anyNType = anyType.withHasQuestionMark(true)
|
override val anyNType = anyType.makeNullable()
|
||||||
|
|
||||||
val bool = builtIns.booleanType
|
val bool = builtIns.booleanType
|
||||||
override val booleanType = bool.toIrType()
|
override val booleanType = bool.toIrType()
|
||||||
@@ -273,7 +272,7 @@ class IrBuiltInsOverDescriptors(
|
|||||||
val nothing = builtIns.nothingType
|
val nothing = builtIns.nothingType
|
||||||
override val nothingType = nothing.toIrType()
|
override val nothingType = nothing.toIrType()
|
||||||
override val nothingClass = builtIns.nothing.toIrSymbol()
|
override val nothingClass = builtIns.nothing.toIrSymbol()
|
||||||
override val nothingNType = nothingType.withHasQuestionMark(true)
|
override val nothingNType = nothingType.makeNullable()
|
||||||
|
|
||||||
val unit = builtIns.unitType
|
val unit = builtIns.unitType
|
||||||
override val unitType = unit.toIrType()
|
override val unitType = unit.toIrType()
|
||||||
|
|||||||
+2
-1
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.impl.IrValueParameterSymbolImpl
|
import org.jetbrains.kotlin.ir.symbols.impl.IrValueParameterSymbolImpl
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
|
import org.jetbrains.kotlin.ir.types.SimpleTypeNullability
|
||||||
import org.jetbrains.kotlin.ir.types.impl.*
|
import org.jetbrains.kotlin.ir.types.impl.*
|
||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.*
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
@@ -329,7 +330,7 @@ class IrDescriptorBasedFunctionFactory(
|
|||||||
return with(IrSimpleTypeBuilder()) {
|
return with(IrSimpleTypeBuilder()) {
|
||||||
classifier =
|
classifier =
|
||||||
symbolTable.referenceClassifier(kotlinType.constructor.declarationDescriptor ?: error("No classifier for type $kotlinType"))
|
symbolTable.referenceClassifier(kotlinType.constructor.declarationDescriptor ?: error("No classifier for type $kotlinType"))
|
||||||
hasQuestionMark = kotlinType.isMarkedNullable
|
nullability = SimpleTypeNullability.fromHasQuestionMark(kotlinType.isMarkedNullable)
|
||||||
arguments = kotlinType.arguments.map {
|
arguments = kotlinType.arguments.map {
|
||||||
if (it.isStarProjection) IrStarProjectionImpl
|
if (it.isStarProjection) IrStarProjectionImpl
|
||||||
else makeTypeProjection(toIrType(it.type), it.projectionKind)
|
else makeTypeProjection(toIrType(it.type), it.projectionKind)
|
||||||
|
|||||||
+1
-5
@@ -52,11 +52,7 @@ class DeepCopyIrTreeWithSymbolsForFakeOverrides(typeArguments: Map<IrTypeParamet
|
|||||||
|
|
||||||
return when (val substitutedType = typeArguments[type.classifier]) {
|
return when (val substitutedType = typeArguments[type.classifier]) {
|
||||||
is IrDynamicType -> substitutedType
|
is IrDynamicType -> substitutedType
|
||||||
is IrDefinitelyNotNullType -> substitutedType
|
is IrSimpleType -> substitutedType.mergeNullability(type)
|
||||||
is IrSimpleType -> substitutedType.buildSimpleType {
|
|
||||||
kotlinType = null
|
|
||||||
hasQuestionMark = type.hasQuestionMark or substitutedType.isMarkedNullable()
|
|
||||||
}
|
|
||||||
else -> type.buildSimpleType {
|
else -> type.buildSimpleType {
|
||||||
kotlinType = null
|
kotlinType = null
|
||||||
classifier = symbolRemapper.getReferencedClassifier(type.classifier)
|
classifier = symbolRemapper.getReferencedClassifier(type.classifier)
|
||||||
|
|||||||
@@ -32,15 +32,56 @@ abstract class IrErrorType(kotlinType: KotlinType?) : IrTypeBase(kotlinType)
|
|||||||
|
|
||||||
abstract class IrDynamicType(kotlinType: KotlinType?) : IrTypeBase(kotlinType), DynamicTypeMarker
|
abstract class IrDynamicType(kotlinType: KotlinType?) : IrTypeBase(kotlinType), DynamicTypeMarker
|
||||||
|
|
||||||
abstract class IrDefinitelyNotNullType(kotlinType: KotlinType?) : IrTypeBase(kotlinType), DefinitelyNotNullTypeMarker {
|
enum class SimpleTypeNullability {
|
||||||
abstract val original: IrType
|
MARKED_NULLABLE,
|
||||||
|
NOT_SPECIFIED,
|
||||||
|
DEFINITELY_NOT_NULL;
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun fromHasQuestionMark(hasQuestionMark: Boolean) = if (hasQuestionMark) MARKED_NULLABLE else NOT_SPECIFIED
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class IrSimpleType(kotlinType: KotlinType?) : IrTypeBase(kotlinType), SimpleTypeMarker, TypeArgumentListMarker {
|
abstract class IrSimpleType(kotlinType: KotlinType?) : IrTypeBase(kotlinType), SimpleTypeMarker, TypeArgumentListMarker {
|
||||||
abstract val classifier: IrClassifierSymbol
|
abstract val classifier: IrClassifierSymbol
|
||||||
abstract val hasQuestionMark: Boolean
|
|
||||||
|
/**
|
||||||
|
* If type is explicitly marked as nullable, [nullability] is [SimpleTypeNullability.MARKED_NULLABLE]
|
||||||
|
*
|
||||||
|
* If classifier is type parameter, not marked as nullable, but can store null values,
|
||||||
|
* if corresponding argument would be nullable, [nullability] is [SimpleTypeNullability.NOT_SPECIFIED]
|
||||||
|
*
|
||||||
|
* If type can't store null values, [nullability] is [SimpleTypeNullability.DEFINITELY_NOT_NULL]
|
||||||
|
*
|
||||||
|
* Direct usages of this property should be avoided in most cases. Use relevant util functions instead.
|
||||||
|
*
|
||||||
|
* In most cases one of following is needed:
|
||||||
|
*
|
||||||
|
* Use [IrType.isNullable] to check if null value is possible for this type
|
||||||
|
*
|
||||||
|
* Use [IrType.isMarkedNullable] to check if type is marked with question mark in code
|
||||||
|
*
|
||||||
|
* Use [IrType.mergeNullability] to apply nullability of type parameter to actual type argument in type substitutions
|
||||||
|
*
|
||||||
|
* Use [IrType.makeNotNull] or [IrType.makeNullable] to transfer nullability from one type to another
|
||||||
|
*/
|
||||||
|
abstract val nullability: SimpleTypeNullability
|
||||||
abstract val arguments: List<IrTypeArgument>
|
abstract val arguments: List<IrTypeArgument>
|
||||||
abstract val abbreviation: IrTypeAbbreviation?
|
abstract val abbreviation: IrTypeAbbreviation?
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This property was deprecated and replaced with [nullability] property.
|
||||||
|
*
|
||||||
|
* Anyway, in most cases one of utils function would be more suitable, than direct usage.
|
||||||
|
*
|
||||||
|
* Check [nullability] property documentation for details
|
||||||
|
*/
|
||||||
|
@Deprecated(
|
||||||
|
level = DeprecationLevel.WARNING,
|
||||||
|
message = "hasQuestionMark has ambiguous meaning. Use isNullable() or isMarkedNullable() instead.",
|
||||||
|
)
|
||||||
|
val hasQuestionMark: Boolean
|
||||||
|
get() = nullability == SimpleTypeNullability.MARKED_NULLABLE
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IrTypeArgument : TypeArgumentMarker {
|
interface IrTypeArgument : TypeArgumentMarker {
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ abstract class AbstractIrTypeSubstitutor(private val irBuiltIns: IrBuiltIns) : T
|
|||||||
arguments = irType.arguments.map { substituteTypeArgument(it) }
|
arguments = irType.arguments.map { substituteTypeArgument(it) }
|
||||||
buildSimpleType()
|
buildSimpleType()
|
||||||
}
|
}
|
||||||
is IrDefinitelyNotNullType ->
|
|
||||||
IrDefinitelyNotNullTypeImpl(null, substituteType(irType.original))
|
|
||||||
is IrDynamicType,
|
is IrDynamicType,
|
||||||
is IrErrorType ->
|
is IrErrorType ->
|
||||||
irType
|
irType
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ import org.jetbrains.kotlin.name.SpecialNames
|
|||||||
import org.jetbrains.kotlin.types.TypeCheckerState
|
import org.jetbrains.kotlin.types.TypeCheckerState
|
||||||
import org.jetbrains.kotlin.types.TypeSystemCommonBackendContext
|
import org.jetbrains.kotlin.types.TypeSystemCommonBackendContext
|
||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
|
import org.jetbrains.kotlin.ir.types.makeNotNull as irMakeNotNull
|
||||||
|
import org.jetbrains.kotlin.ir.types.makeNullable as irMakeNullable
|
||||||
|
import org.jetbrains.kotlin.ir.types.isMarkedNullable as irIsMarkedNullable
|
||||||
import org.jetbrains.kotlin.types.model.*
|
import org.jetbrains.kotlin.types.model.*
|
||||||
import org.jetbrains.kotlin.ir.types.isPrimitiveType as irTypePredicates_isPrimitiveType
|
import org.jetbrains.kotlin.ir.types.isPrimitiveType as irTypePredicates_isPrimitiveType
|
||||||
|
|
||||||
@@ -71,20 +74,18 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
|
|||||||
|
|
||||||
override fun SimpleTypeMarker.asDefinitelyNotNullType(): DefinitelyNotNullTypeMarker? = null
|
override fun SimpleTypeMarker.asDefinitelyNotNullType(): DefinitelyNotNullTypeMarker? = null
|
||||||
|
|
||||||
override fun SimpleTypeMarker.isMarkedNullable(): Boolean = this is IrSimpleType && hasQuestionMark
|
override fun SimpleTypeMarker.isMarkedNullable(): Boolean = this is IrSimpleType && this.irIsMarkedNullable()
|
||||||
|
|
||||||
override fun KotlinTypeMarker.isMarkedNullable(): Boolean = this is IrSimpleType && hasQuestionMark
|
override fun KotlinTypeMarker.isMarkedNullable(): Boolean = this is IrSimpleType && this.irIsMarkedNullable()
|
||||||
|
|
||||||
override fun SimpleTypeMarker.withNullability(nullable: Boolean): SimpleTypeMarker {
|
override fun SimpleTypeMarker.withNullability(nullable: Boolean): SimpleTypeMarker {
|
||||||
val simpleType = this as IrSimpleType
|
val simpleType = this as IrSimpleType
|
||||||
return if (simpleType.hasQuestionMark == nullable) simpleType
|
return (if (nullable) simpleType.irMakeNullable() else simpleType.irMakeNotNull()) as IrSimpleType
|
||||||
else simpleType.run { IrSimpleTypeImpl(classifier, nullable, arguments, annotations) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun SimpleTypeMarker.typeConstructor(): TypeConstructorMarker = when (this) {
|
override fun SimpleTypeMarker.typeConstructor(): TypeConstructorMarker = when (this) {
|
||||||
is IrCapturedType -> constructor
|
is IrCapturedType -> constructor
|
||||||
is IrSimpleType -> classifier
|
is IrSimpleType -> classifier
|
||||||
is IrDefinitelyNotNullType -> original.typeConstructor()
|
|
||||||
else -> error("Unknown type constructor")
|
else -> error("Unknown type constructor")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,7 +291,7 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return IrSimpleTypeImpl(type.classifier, type.hasQuestionMark, newArguments, type.annotations)
|
return IrSimpleTypeImpl(type.classifier, type.nullability, newArguments, type.annotations)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun SimpleTypeMarker.asArgumentList() = this as IrSimpleType
|
override fun SimpleTypeMarker.asArgumentList() = this as IrSimpleType
|
||||||
@@ -341,7 +342,7 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
|
|||||||
require(ourAnnotations?.size == attributes?.size)
|
require(ourAnnotations?.size == attributes?.size)
|
||||||
return IrSimpleTypeImpl(
|
return IrSimpleTypeImpl(
|
||||||
constructor as IrClassifierSymbol,
|
constructor as IrClassifierSymbol,
|
||||||
nullable,
|
if (nullable) SimpleTypeNullability.MARKED_NULLABLE else SimpleTypeNullability.DEFINITELY_NOT_NULL,
|
||||||
arguments.map { it as IrTypeArgument },
|
arguments.map { it as IrTypeArgument },
|
||||||
ourAnnotations ?: emptyList()
|
ourAnnotations ?: emptyList()
|
||||||
)
|
)
|
||||||
@@ -556,7 +557,7 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
|
|||||||
error("Captured type is unsupported in IR")
|
error("Captured type is unsupported in IR")
|
||||||
|
|
||||||
override fun DefinitelyNotNullTypeMarker.original(): SimpleTypeMarker =
|
override fun DefinitelyNotNullTypeMarker.original(): SimpleTypeMarker =
|
||||||
(this as IrDefinitelyNotNullType).original as IrSimpleType
|
error("DefinitelyNotNullTypeMarker.original() type is unsupported in IR")
|
||||||
|
|
||||||
override fun KotlinTypeMarker.makeDefinitelyNotNullOrNotNull(): KotlinTypeMarker {
|
override fun KotlinTypeMarker.makeDefinitelyNotNullOrNotNull(): KotlinTypeMarker {
|
||||||
error("makeDefinitelyNotNullOrNotNull is not supported in IR")
|
error("makeDefinitelyNotNullOrNotNull is not supported in IR")
|
||||||
|
|||||||
@@ -7,10 +7,7 @@ package org.jetbrains.kotlin.ir.types
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.builtins.StandardNames
|
import org.jetbrains.kotlin.builtins.StandardNames
|
||||||
import org.jetbrains.kotlin.ir.IrBuiltIns
|
import org.jetbrains.kotlin.ir.IrBuiltIns
|
||||||
import org.jetbrains.kotlin.ir.symbols.FqNameEqualityChecker
|
import org.jetbrains.kotlin.ir.symbols.*
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
import org.jetbrains.kotlin.ir.util.fqNameWhenAvailable
|
||||||
import org.jetbrains.kotlin.types.AbstractTypeChecker
|
import org.jetbrains.kotlin.types.AbstractTypeChecker
|
||||||
|
|
||||||
@@ -37,10 +34,15 @@ fun IrType.isSubtypeOf(superType: IrType, typeSystem: IrTypeSystemContext): Bool
|
|||||||
|
|
||||||
fun IrType.isNullable(): Boolean =
|
fun IrType.isNullable(): Boolean =
|
||||||
when (this) {
|
when (this) {
|
||||||
is IrDefinitelyNotNullType -> false
|
|
||||||
is IrSimpleType -> when (val classifier = classifier) {
|
is IrSimpleType -> when (val classifier = classifier) {
|
||||||
is IrClassSymbol -> hasQuestionMark
|
is IrClassSymbol -> nullability == SimpleTypeNullability.MARKED_NULLABLE
|
||||||
is IrTypeParameterSymbol -> hasQuestionMark || classifier.owner.superTypes.any(IrType::isNullable)
|
is IrTypeParameterSymbol -> when (nullability) {
|
||||||
|
SimpleTypeNullability.MARKED_NULLABLE -> true
|
||||||
|
// here is a bug, there should be .all check (not .any),
|
||||||
|
// but fixing it is a breaking change, see KT-31545 for details
|
||||||
|
SimpleTypeNullability.NOT_SPECIFIED -> classifier.owner.superTypes.any(IrType::isNullable)
|
||||||
|
SimpleTypeNullability.DEFINITELY_NOT_NULL -> false
|
||||||
|
}
|
||||||
else -> error("Unsupported classifier: $classifier")
|
else -> error("Unsupported classifier: $classifier")
|
||||||
}
|
}
|
||||||
is IrDynamicType -> true
|
is IrDynamicType -> true
|
||||||
@@ -73,9 +75,3 @@ fun IrType.toArrayOrPrimitiveArrayType(irBuiltIns: IrBuiltIns): IrType =
|
|||||||
} else {
|
} else {
|
||||||
irBuiltIns.arrayClass.typeWith(this)
|
irBuiltIns.arrayClass.typeWith(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun IrType.unwrapDefinitelyNotNullType(): IrType =
|
|
||||||
if (this is IrDefinitelyNotNullType)
|
|
||||||
this.original.unwrapDefinitelyNotNullType()
|
|
||||||
else
|
|
||||||
this
|
|
||||||
|
|||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.ir.types.impl
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
|
||||||
import org.jetbrains.kotlin.ir.types.IrDefinitelyNotNullType
|
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
|
||||||
import org.jetbrains.kotlin.types.Variance
|
|
||||||
|
|
||||||
class IrDefinitelyNotNullTypeImpl(
|
|
||||||
kotlinType: KotlinType?,
|
|
||||||
override val original: IrType,
|
|
||||||
) : IrDefinitelyNotNullType(kotlinType) {
|
|
||||||
|
|
||||||
override val annotations: List<IrConstructorCall>
|
|
||||||
get() = original.annotations
|
|
||||||
|
|
||||||
override val variance: Variance
|
|
||||||
get() = Variance.INVARIANT
|
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean =
|
|
||||||
other is IrDefinitelyNotNullType &&
|
|
||||||
this.original == other.original
|
|
||||||
|
|
||||||
override fun hashCode(): Int =
|
|
||||||
original.hashCode()
|
|
||||||
}
|
|
||||||
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.ir.types.impl
|
|||||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||||
import org.jetbrains.kotlin.ir.symbols.FqNameEqualityChecker
|
import org.jetbrains.kotlin.ir.symbols.FqNameEqualityChecker
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
||||||
|
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
@@ -18,7 +19,7 @@ abstract class IrAbstractSimpleType(kotlinType: KotlinType?) : IrSimpleType(kotl
|
|||||||
get() = Variance.INVARIANT
|
get() = Variance.INVARIANT
|
||||||
|
|
||||||
abstract override val classifier: IrClassifierSymbol
|
abstract override val classifier: IrClassifierSymbol
|
||||||
abstract override val hasQuestionMark: Boolean
|
abstract override val nullability: SimpleTypeNullability
|
||||||
abstract override val arguments: List<IrTypeArgument>
|
abstract override val arguments: List<IrTypeArgument>
|
||||||
abstract override val annotations: List<IrConstructorCall>
|
abstract override val annotations: List<IrConstructorCall>
|
||||||
abstract override val abbreviation: IrTypeAbbreviation?
|
abstract override val abbreviation: IrTypeAbbreviation?
|
||||||
@@ -26,12 +27,12 @@ abstract class IrAbstractSimpleType(kotlinType: KotlinType?) : IrSimpleType(kotl
|
|||||||
override fun equals(other: Any?): Boolean =
|
override fun equals(other: Any?): Boolean =
|
||||||
other is IrAbstractSimpleType &&
|
other is IrAbstractSimpleType &&
|
||||||
FqNameEqualityChecker.areEqual(classifier, other.classifier) &&
|
FqNameEqualityChecker.areEqual(classifier, other.classifier) &&
|
||||||
hasQuestionMark == other.hasQuestionMark &&
|
nullability == other.nullability &&
|
||||||
arguments == other.arguments
|
arguments == other.arguments
|
||||||
|
|
||||||
override fun hashCode(): Int =
|
override fun hashCode(): Int =
|
||||||
(FqNameEqualityChecker.getHashCode(classifier) * 31 +
|
(FqNameEqualityChecker.getHashCode(classifier) * 31 +
|
||||||
hasQuestionMark.hashCode()) * 31 +
|
nullability.hashCode()) * 31 +
|
||||||
arguments.hashCode()
|
arguments.hashCode()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,8 +42,8 @@ abstract class IrDelegatedSimpleType(kotlinType: KotlinType? = null) : IrAbstrac
|
|||||||
|
|
||||||
override val classifier: IrClassifierSymbol
|
override val classifier: IrClassifierSymbol
|
||||||
get() = delegate.classifier
|
get() = delegate.classifier
|
||||||
override val hasQuestionMark: Boolean
|
override val nullability: SimpleTypeNullability
|
||||||
get() = delegate.hasQuestionMark
|
get() = delegate.nullability
|
||||||
override val arguments: List<IrTypeArgument>
|
override val arguments: List<IrTypeArgument>
|
||||||
get() = delegate.arguments
|
get() = delegate.arguments
|
||||||
override val abbreviation: IrTypeAbbreviation?
|
override val abbreviation: IrTypeAbbreviation?
|
||||||
@@ -54,25 +55,40 @@ abstract class IrDelegatedSimpleType(kotlinType: KotlinType? = null) : IrAbstrac
|
|||||||
class IrSimpleTypeImpl(
|
class IrSimpleTypeImpl(
|
||||||
kotlinType: KotlinType?,
|
kotlinType: KotlinType?,
|
||||||
override val classifier: IrClassifierSymbol,
|
override val classifier: IrClassifierSymbol,
|
||||||
override val hasQuestionMark: Boolean,
|
nullability: SimpleTypeNullability,
|
||||||
override val arguments: List<IrTypeArgument>,
|
override val arguments: List<IrTypeArgument>,
|
||||||
override val annotations: List<IrConstructorCall>,
|
override val annotations: List<IrConstructorCall>,
|
||||||
override val abbreviation: IrTypeAbbreviation? = null
|
override val abbreviation: IrTypeAbbreviation? = null
|
||||||
) : IrAbstractSimpleType(kotlinType) {
|
) : IrAbstractSimpleType(kotlinType) {
|
||||||
|
|
||||||
|
override val nullability =
|
||||||
|
if (classifier !is IrTypeParameterSymbol && nullability == SimpleTypeNullability.NOT_SPECIFIED)
|
||||||
|
SimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
|
else
|
||||||
|
nullability
|
||||||
|
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
classifier: IrClassifierSymbol,
|
||||||
|
nullability: SimpleTypeNullability,
|
||||||
|
arguments: List<IrTypeArgument>,
|
||||||
|
annotations: List<IrConstructorCall>,
|
||||||
|
abbreviation: IrTypeAbbreviation? = null
|
||||||
|
) : this(null, classifier, nullability, arguments, annotations, abbreviation)
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
classifier: IrClassifierSymbol,
|
classifier: IrClassifierSymbol,
|
||||||
hasQuestionMark: Boolean,
|
hasQuestionMark: Boolean,
|
||||||
arguments: List<IrTypeArgument>,
|
arguments: List<IrTypeArgument>,
|
||||||
annotations: List<IrConstructorCall>,
|
annotations: List<IrConstructorCall>,
|
||||||
abbreviation: IrTypeAbbreviation? = null
|
abbreviation: IrTypeAbbreviation? = null
|
||||||
) : this(null, classifier, hasQuestionMark, arguments, annotations, abbreviation)
|
) : this(null, classifier, SimpleTypeNullability.fromHasQuestionMark(hasQuestionMark), arguments, annotations, abbreviation)
|
||||||
}
|
}
|
||||||
|
|
||||||
class IrSimpleTypeBuilder {
|
class IrSimpleTypeBuilder {
|
||||||
var kotlinType: KotlinType? = null
|
var kotlinType: KotlinType? = null
|
||||||
var classifier: IrClassifierSymbol? = null
|
var classifier: IrClassifierSymbol? = null
|
||||||
var hasQuestionMark = false
|
var nullability = SimpleTypeNullability.NOT_SPECIFIED
|
||||||
var arguments: List<IrTypeArgument> = emptyList()
|
var arguments: List<IrTypeArgument> = emptyList()
|
||||||
var annotations: List<IrConstructorCall> = emptyList()
|
var annotations: List<IrConstructorCall> = emptyList()
|
||||||
var abbreviation: IrTypeAbbreviation? = null
|
var abbreviation: IrTypeAbbreviation? = null
|
||||||
@@ -83,7 +99,7 @@ fun IrSimpleType.toBuilder() =
|
|||||||
IrSimpleTypeBuilder().also { b ->
|
IrSimpleTypeBuilder().also { b ->
|
||||||
b.kotlinType = originalKotlinType
|
b.kotlinType = originalKotlinType
|
||||||
b.classifier = classifier
|
b.classifier = classifier
|
||||||
b.hasQuestionMark = hasQuestionMark
|
b.nullability = nullability
|
||||||
b.arguments = arguments
|
b.arguments = arguments
|
||||||
b.annotations = annotations
|
b.annotations = annotations
|
||||||
b.abbreviation = abbreviation
|
b.abbreviation = abbreviation
|
||||||
@@ -93,7 +109,7 @@ fun IrSimpleTypeBuilder.buildSimpleType() =
|
|||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
kotlinType,
|
kotlinType,
|
||||||
classifier ?: throw AssertionError("Classifier not provided"),
|
classifier ?: throw AssertionError("Classifier not provided"),
|
||||||
hasQuestionMark,
|
nullability,
|
||||||
arguments,
|
arguments,
|
||||||
annotations,
|
annotations,
|
||||||
abbreviation
|
abbreviation
|
||||||
@@ -122,7 +138,6 @@ class IrTypeProjectionImpl internal constructor(
|
|||||||
fun makeTypeProjection(type: IrType, variance: Variance): IrTypeProjection =
|
fun makeTypeProjection(type: IrType, variance: Variance): IrTypeProjection =
|
||||||
when {
|
when {
|
||||||
type is IrCapturedType -> IrTypeProjectionImpl(type, variance)
|
type is IrCapturedType -> IrTypeProjectionImpl(type, variance)
|
||||||
type is IrDefinitelyNotNullType -> IrTypeProjectionImpl(type, variance)
|
|
||||||
type is IrTypeProjection && type.variance == variance -> type
|
type is IrTypeProjection && type.variance == variance -> type
|
||||||
type is IrSimpleType -> type.toBuilder().apply { this.variance = variance }.buildTypeProjection()
|
type is IrSimpleType -> type.toBuilder().apply { this.variance = variance }.buildTypeProjection()
|
||||||
type is IrDynamicType -> IrDynamicTypeImpl(null, type.annotations, variance)
|
type is IrDynamicType -> IrDynamicTypeImpl(null, type.annotations, variance)
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class IrCapturedType(
|
|||||||
override val classifier: IrClassifierSymbol get() = error("Captured Type does not have a classifier")
|
override val classifier: IrClassifierSymbol get() = error("Captured Type does not have a classifier")
|
||||||
override val arguments: List<IrTypeArgument> get() = emptyList()
|
override val arguments: List<IrTypeArgument> get() = emptyList()
|
||||||
override val abbreviation: IrTypeAbbreviation? get () = null
|
override val abbreviation: IrTypeAbbreviation? get () = null
|
||||||
override val hasQuestionMark: Boolean get() = false
|
override val nullability: SimpleTypeNullability get() = SimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
override val annotations: List<IrConstructorCall> get() = emptyList()
|
override val annotations: List<IrConstructorCall> get() = emptyList()
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
|
|||||||
@@ -48,15 +48,15 @@ object IdSignatureValues {
|
|||||||
@JvmField val sequence = IdSignature.CommonSignature("kotlin.sequences", "Sequence", null, 0)
|
@JvmField val sequence = IdSignature.CommonSignature("kotlin.sequences", "Sequence", null, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun IrType.isNotNullClassType(signature: IdSignature.CommonSignature) = isClassType(signature, hasQuestionMark = false)
|
private fun IrType.isNotNullClassType(signature: IdSignature.CommonSignature) = isClassType(signature, nullable = false)
|
||||||
private fun IrType.isNullableClassType(signature: IdSignature.CommonSignature) = isClassType(signature, hasQuestionMark = true)
|
private fun IrType.isNullableClassType(signature: IdSignature.CommonSignature) = isClassType(signature, nullable = true)
|
||||||
|
|
||||||
fun getPublicSignature(packageFqName: FqName, name: String) =
|
fun getPublicSignature(packageFqName: FqName, name: String) =
|
||||||
IdSignature.CommonSignature(packageFqName.asString(), name, null, 0)
|
IdSignature.CommonSignature(packageFqName.asString(), name, null, 0)
|
||||||
|
|
||||||
private fun IrType.isClassType(signature: IdSignature.CommonSignature, hasQuestionMark: Boolean? = null): Boolean {
|
private fun IrType.isClassType(signature: IdSignature.CommonSignature, nullable: Boolean? = null): Boolean {
|
||||||
if (this !is IrSimpleType) return false
|
if (this !is IrSimpleType) return false
|
||||||
if (hasQuestionMark != null && this.hasQuestionMark != hasQuestionMark) return false
|
if (nullable != null && this.isMarkedNullable() != nullable) return false
|
||||||
return signature == classifier.signature ||
|
return signature == classifier.signature ||
|
||||||
classifier.owner.let { it is IrClass && it.hasFqNameEqualToSignature(signature) }
|
classifier.owner.let { it is IrClass && it.hasFqNameEqualToSignature(signature) }
|
||||||
}
|
}
|
||||||
@@ -109,16 +109,16 @@ fun IrType.isCollection(): Boolean = isNotNullClassType(IdSignatureValues.collec
|
|||||||
fun IrType.isNothing(): Boolean = isNotNullClassType(IdSignatureValues.nothing)
|
fun IrType.isNothing(): Boolean = isNotNullClassType(IdSignatureValues.nothing)
|
||||||
fun IrType.isNullableNothing(): Boolean = isNullableClassType(IdSignatureValues.nothing)
|
fun IrType.isNullableNothing(): Boolean = isNullableClassType(IdSignatureValues.nothing)
|
||||||
|
|
||||||
fun IrType.isPrimitiveType(hasQuestionMark: Boolean = false): Boolean =
|
fun IrType.isPrimitiveType(nullable: Boolean = false): Boolean =
|
||||||
this is IrSimpleType && hasQuestionMark == this.hasQuestionMark && getPrimitiveType() != null
|
nullable == this.isMarkedNullable() && getPrimitiveType() != null
|
||||||
|
|
||||||
fun IrType.isNullablePrimitiveType(): Boolean = isPrimitiveType(true)
|
fun IrType.isNullablePrimitiveType(): Boolean = isPrimitiveType(true)
|
||||||
|
|
||||||
fun IrType.getPrimitiveType(): PrimitiveType? =
|
fun IrType.getPrimitiveType(): PrimitiveType? =
|
||||||
getPrimitiveOrUnsignedType(idSignatureToPrimitiveType, shortNameToPrimitiveType)
|
getPrimitiveOrUnsignedType(idSignatureToPrimitiveType, shortNameToPrimitiveType)
|
||||||
|
|
||||||
fun IrType.isUnsignedType(hasQuestionMark: Boolean = false): Boolean =
|
fun IrType.isUnsignedType(nullable: Boolean = false): Boolean =
|
||||||
this is IrSimpleType && hasQuestionMark == this.hasQuestionMark && getUnsignedType() != null
|
nullable == this.isMarkedNullable() && getUnsignedType() != null
|
||||||
|
|
||||||
fun IrType.getUnsignedType(): UnsignedType? =
|
fun IrType.getUnsignedType(): UnsignedType? =
|
||||||
getPrimitiveOrUnsignedType(idSignatureToUnsignedType, shortNameToUnsignedType)
|
getPrimitiveOrUnsignedType(idSignatureToUnsignedType, shortNameToUnsignedType)
|
||||||
@@ -134,7 +134,8 @@ fun <T : Enum<T>> IrType.getPrimitiveOrUnsignedType(byIdSignature: Map<IdSignatu
|
|||||||
return byShortName[klass.name]
|
return byShortName[klass.name]
|
||||||
}
|
}
|
||||||
|
|
||||||
fun IrType.isMarkedNullable() = (this as? IrSimpleType)?.hasQuestionMark ?: false
|
fun IrType.isMarkedNullable() = (this as? IrSimpleType)?.nullability == SimpleTypeNullability.MARKED_NULLABLE
|
||||||
|
fun IrSimpleType.isMarkedNullable() = nullability == SimpleTypeNullability.MARKED_NULLABLE
|
||||||
|
|
||||||
fun IrType.isUnit() = isNotNullClassType(IdSignatureValues.unit)
|
fun IrType.isUnit() = isNotNullClassType(IdSignatureValues.unit)
|
||||||
|
|
||||||
@@ -152,8 +153,8 @@ fun IrType.isFloat(): Boolean = isNotNullClassType(IdSignatureValues._float)
|
|||||||
fun IrType.isDouble(): Boolean = isNotNullClassType(IdSignatureValues._double)
|
fun IrType.isDouble(): Boolean = isNotNullClassType(IdSignatureValues._double)
|
||||||
fun IrType.isNumber(): Boolean = isNotNullClassType(IdSignatureValues.number)
|
fun IrType.isNumber(): Boolean = isNotNullClassType(IdSignatureValues.number)
|
||||||
fun IrType.isDoubleOrFloatWithoutNullability(): Boolean {
|
fun IrType.isDoubleOrFloatWithoutNullability(): Boolean {
|
||||||
return isClassType(IdSignatureValues._double, hasQuestionMark = null) ||
|
return isClassType(IdSignatureValues._double, nullable = null) ||
|
||||||
isClassType(IdSignatureValues._float, hasQuestionMark = null)
|
isClassType(IdSignatureValues._float, nullable = null)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun IrType.isComparable(): Boolean = isNotNullClassType(IdSignatureValues.comparable)
|
fun IrType.isComparable(): Boolean = isNotNullClassType(IdSignatureValues.comparable)
|
||||||
@@ -170,9 +171,9 @@ fun IrType.isLongArray(): Boolean = isNotNullClassType(primitiveArrayTypesSignat
|
|||||||
fun IrType.isFloatArray(): Boolean = isNotNullClassType(primitiveArrayTypesSignatures[PrimitiveType.FLOAT]!!)
|
fun IrType.isFloatArray(): Boolean = isNotNullClassType(primitiveArrayTypesSignatures[PrimitiveType.FLOAT]!!)
|
||||||
fun IrType.isDoubleArray(): Boolean = isNotNullClassType(primitiveArrayTypesSignatures[PrimitiveType.DOUBLE]!!)
|
fun IrType.isDoubleArray(): Boolean = isNotNullClassType(primitiveArrayTypesSignatures[PrimitiveType.DOUBLE]!!)
|
||||||
|
|
||||||
fun IrType.isClassType(fqName: FqNameUnsafe, hasQuestionMark: Boolean): Boolean {
|
fun IrType.isClassType(fqName: FqNameUnsafe, nullable: Boolean): Boolean {
|
||||||
if (this !is IrSimpleType) return false
|
if (this !is IrSimpleType) return false
|
||||||
if (this.hasQuestionMark != hasQuestionMark) return false
|
if (this.isMarkedNullable() != nullable) return false
|
||||||
return classifier.isClassWithFqName(fqName)
|
return classifier.isClassWithFqName(fqName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,27 +20,29 @@ import org.jetbrains.kotlin.ir.types.impl.*
|
|||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.*
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
import org.jetbrains.kotlin.types.*
|
import org.jetbrains.kotlin.types.*
|
||||||
import org.jetbrains.kotlin.types.typeUtil.makeNotNullable
|
|
||||||
import org.jetbrains.kotlin.types.typeUtil.makeNullable
|
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.cast
|
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
|
||||||
|
|
||||||
fun IrType.withHasQuestionMark(newHasQuestionMark: Boolean): IrType =
|
private fun IrType.withNullability(newNullability: Boolean): IrType =
|
||||||
when (this) {
|
when (this) {
|
||||||
is IrSimpleType -> withHasQuestionMark(newHasQuestionMark)
|
is IrSimpleType -> withNullability(newNullability)
|
||||||
else -> this
|
else -> this
|
||||||
}
|
}
|
||||||
|
|
||||||
fun IrSimpleType.withHasQuestionMark(newHasQuestionMark: Boolean): IrSimpleType =
|
private fun IrSimpleType.withNullability(newNullability: Boolean): IrSimpleType {
|
||||||
if (this.hasQuestionMark == newHasQuestionMark)
|
val requiredNullability = if (newNullability) SimpleTypeNullability.MARKED_NULLABLE else SimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
|
return if (nullability == requiredNullability)
|
||||||
this
|
this
|
||||||
else
|
else
|
||||||
buildSimpleType {
|
buildSimpleType {
|
||||||
hasQuestionMark = newHasQuestionMark
|
nullability = requiredNullability
|
||||||
kotlinType = originalKotlinType?.run {
|
kotlinType = originalKotlinType?.run {
|
||||||
if (newHasQuestionMark) makeNullable() else makeNotNullable()
|
if (newNullability) {
|
||||||
|
TypeUtils.makeNullable(this)
|
||||||
|
} else {
|
||||||
|
DefinitelyNotNullType.makeDefinitelyNotNull(this.unwrap()) ?: TypeUtils.makeNotNullable(this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun IrType.addAnnotations(newAnnotations: List<IrConstructorCall>): IrType =
|
fun IrType.addAnnotations(newAnnotations: List<IrConstructorCall>): IrType =
|
||||||
if (newAnnotations.isEmpty())
|
if (newAnnotations.isEmpty())
|
||||||
@@ -86,7 +88,6 @@ val IrType.classifierOrFail: IrClassifierSymbol
|
|||||||
val IrType.classifierOrNull: IrClassifierSymbol?
|
val IrType.classifierOrNull: IrClassifierSymbol?
|
||||||
get() = when (this) {
|
get() = when (this) {
|
||||||
is IrSimpleType -> classifier
|
is IrSimpleType -> classifier
|
||||||
is IrDefinitelyNotNullType -> original.classifierOrNull
|
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,34 +104,18 @@ val IrType.classFqName: FqName?
|
|||||||
|
|
||||||
val IrTypeArgument.typeOrNull: IrType? get() = (this as? IrTypeProjection)?.type
|
val IrTypeArgument.typeOrNull: IrType? get() = (this as? IrTypeProjection)?.type
|
||||||
|
|
||||||
fun IrType.makeNotNull() =
|
fun IrType.makeNotNull() = withNullability(false)
|
||||||
if (this is IrSimpleType && this.hasQuestionMark) {
|
|
||||||
buildSimpleType {
|
|
||||||
kotlinType = originalKotlinType?.makeNotNullable()
|
|
||||||
hasQuestionMark = false
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this
|
|
||||||
}
|
|
||||||
|
|
||||||
fun IrType.makeNullable(): IrType =
|
fun IrType.makeNullable() = withNullability(true)
|
||||||
when (this) {
|
|
||||||
is IrSimpleType -> {
|
fun IrType.mergeNullability(other: IrType) = when (other) {
|
||||||
if (this.hasQuestionMark)
|
is IrSimpleType -> when (other.nullability) {
|
||||||
this
|
SimpleTypeNullability.MARKED_NULLABLE -> makeNullable()
|
||||||
else
|
SimpleTypeNullability.NOT_SPECIFIED -> this
|
||||||
buildSimpleType {
|
SimpleTypeNullability.DEFINITELY_NOT_NULL -> makeNotNull()
|
||||||
kotlinType = originalKotlinType?.makeNullable()
|
|
||||||
hasQuestionMark = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is IrDefinitelyNotNullType -> {
|
|
||||||
// '{ T & Any }?' => 'T?'
|
|
||||||
this.original.makeNullable()
|
|
||||||
}
|
|
||||||
else ->
|
|
||||||
this
|
|
||||||
}
|
}
|
||||||
|
else -> this
|
||||||
|
}
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
fun IrType.toKotlinType(): KotlinType {
|
fun IrType.toKotlinType(): KotlinType {
|
||||||
@@ -139,7 +124,7 @@ fun IrType.toKotlinType(): KotlinType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return when (this) {
|
return when (this) {
|
||||||
is IrSimpleType -> makeKotlinType(classifier, arguments, hasQuestionMark)
|
is IrSimpleType -> makeKotlinType(classifier, arguments, nullability == SimpleTypeNullability.MARKED_NULLABLE)
|
||||||
else -> TODO(toString())
|
else -> TODO(toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,7 +166,7 @@ val IrClassifierSymbol.defaultType: IrType
|
|||||||
val IrTypeParameter.defaultType: IrType
|
val IrTypeParameter.defaultType: IrType
|
||||||
get() = IrSimpleTypeImpl(
|
get() = IrSimpleTypeImpl(
|
||||||
symbol,
|
symbol,
|
||||||
hasQuestionMark = false,
|
SimpleTypeNullability.NOT_SPECIFIED,
|
||||||
arguments = emptyList(),
|
arguments = emptyList(),
|
||||||
annotations = emptyList()
|
annotations = emptyList()
|
||||||
)
|
)
|
||||||
@@ -189,7 +174,7 @@ val IrTypeParameter.defaultType: IrType
|
|||||||
val IrClassSymbol.starProjectedType: IrSimpleType
|
val IrClassSymbol.starProjectedType: IrSimpleType
|
||||||
get() = IrSimpleTypeImpl(
|
get() = IrSimpleTypeImpl(
|
||||||
this,
|
this,
|
||||||
hasQuestionMark = false,
|
SimpleTypeNullability.NOT_SPECIFIED,
|
||||||
arguments = owner.typeConstructorParameters.map { IrStarProjectionImpl }.toList(),
|
arguments = owner.typeConstructorParameters.map { IrStarProjectionImpl }.toList(),
|
||||||
annotations = emptyList()
|
annotations = emptyList()
|
||||||
)
|
)
|
||||||
@@ -230,13 +215,13 @@ fun IrClassifierSymbol.typeWith(vararg arguments: IrType): IrSimpleType = typeWi
|
|||||||
fun IrClassifierSymbol.typeWith(arguments: List<IrType>): IrSimpleType =
|
fun IrClassifierSymbol.typeWith(arguments: List<IrType>): IrSimpleType =
|
||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
this,
|
this,
|
||||||
false,
|
SimpleTypeNullability.NOT_SPECIFIED,
|
||||||
arguments.map { makeTypeProjection(it, Variance.INVARIANT) },
|
arguments.map { makeTypeProjection(it, Variance.INVARIANT) },
|
||||||
emptyList()
|
emptyList()
|
||||||
)
|
)
|
||||||
|
|
||||||
fun IrClassifierSymbol.typeWithArguments(arguments: List<IrTypeArgument>): IrSimpleType =
|
fun IrClassifierSymbol.typeWithArguments(arguments: List<IrTypeArgument>): IrSimpleType =
|
||||||
IrSimpleTypeImpl(this, false, arguments, emptyList())
|
IrSimpleTypeImpl(this, SimpleTypeNullability.NOT_SPECIFIED, arguments, emptyList())
|
||||||
|
|
||||||
fun IrClass.typeWith(arguments: List<IrType>) = this.symbol.typeWith(arguments)
|
fun IrClass.typeWith(arguments: List<IrType>) = this.symbol.typeWith(arguments)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.ir.util
|
|||||||
import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer
|
import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrDefinitelyNotNullTypeImpl
|
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrTypeAbbreviationImpl
|
import org.jetbrains.kotlin.ir.types.impl.IrTypeAbbreviationImpl
|
||||||
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
import org.jetbrains.kotlin.ir.types.impl.makeTypeProjection
|
||||||
@@ -29,11 +28,10 @@ class DeepCopyTypeRemapper(
|
|||||||
|
|
||||||
override fun remapType(type: IrType): IrType {
|
override fun remapType(type: IrType): IrType {
|
||||||
return when (type) {
|
return when (type) {
|
||||||
is IrDefinitelyNotNullType -> IrDefinitelyNotNullTypeImpl(null, remapType(type.original))
|
|
||||||
is IrSimpleType -> IrSimpleTypeImpl(
|
is IrSimpleType -> IrSimpleTypeImpl(
|
||||||
null,
|
null,
|
||||||
symbolRemapper.getReferencedClassifier(type.classifier),
|
symbolRemapper.getReferencedClassifier(type.classifier),
|
||||||
type.hasQuestionMark,
|
type.nullability,
|
||||||
type.arguments.map { remapTypeArgument(it) },
|
type.arguments.map { remapTypeArgument(it) },
|
||||||
type.annotations.map { it.transform(deepCopy, null) as IrConstructorCall },
|
type.annotations.map { it.transform(deepCopy, null) as IrConstructorCall },
|
||||||
type.abbreviation?.remapTypeAbbreviation()
|
type.abbreviation?.remapTypeAbbreviation()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class IrTypeParameterRemapper(
|
|||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
null,
|
null,
|
||||||
type.classifier.remap(),
|
type.classifier.remap(),
|
||||||
type.hasQuestionMark,
|
type.nullability,
|
||||||
type.arguments.map { it.remap() },
|
type.arguments.map { it.remap() },
|
||||||
type.annotations,
|
type.annotations,
|
||||||
type.abbreviation?.remap()
|
type.abbreviation?.remap()
|
||||||
|
|||||||
@@ -12,10 +12,7 @@ import org.jetbrains.kotlin.ir.IrElement
|
|||||||
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.expressions.*
|
import org.jetbrains.kotlin.ir.expressions.*
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassifierSymbol
|
import org.jetbrains.kotlin.ir.symbols.*
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrTypeAliasSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.impl.ReturnTypeIsNotInitializedException
|
import org.jetbrains.kotlin.ir.types.impl.ReturnTypeIsNotInitializedException
|
||||||
import org.jetbrains.kotlin.ir.types.impl.originalKotlinType
|
import org.jetbrains.kotlin.ir.types.impl.originalKotlinType
|
||||||
@@ -113,9 +110,9 @@ class RenderIrElementVisitor(private val normalizeNames: Boolean = false, privat
|
|||||||
|
|
||||||
is IrErrorType -> "IrErrorType(${if (verboseErrorTypes) originalKotlinType else null})"
|
is IrErrorType -> "IrErrorType(${if (verboseErrorTypes) originalKotlinType else null})"
|
||||||
|
|
||||||
is IrDefinitelyNotNullType -> "{${original.render()} & Any}"
|
|
||||||
|
|
||||||
is IrSimpleType -> buildTrimEnd {
|
is IrSimpleType -> buildTrimEnd {
|
||||||
|
val isDefinitelyNotNullType = classifier is IrTypeParameterSymbol && nullability == SimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
|
if (isDefinitelyNotNullType) append("{")
|
||||||
append(classifier.renderClassifierFqn())
|
append(classifier.renderClassifierFqn())
|
||||||
if (arguments.isNotEmpty()) {
|
if (arguments.isNotEmpty()) {
|
||||||
append(
|
append(
|
||||||
@@ -124,7 +121,9 @@ class RenderIrElementVisitor(private val normalizeNames: Boolean = false, privat
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (hasQuestionMark) {
|
if (isDefinitelyNotNullType) {
|
||||||
|
append(" & Any}")
|
||||||
|
} else if (isMarkedNullable()) {
|
||||||
append('?')
|
append('?')
|
||||||
}
|
}
|
||||||
abbreviation?.let {
|
abbreviation?.let {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class SimpleTypeRemapper(
|
|||||||
IrSimpleTypeImpl(
|
IrSimpleTypeImpl(
|
||||||
null,
|
null,
|
||||||
symbol,
|
symbol,
|
||||||
type.hasQuestionMark,
|
type.nullability,
|
||||||
arguments,
|
arguments,
|
||||||
type.annotations,
|
type.annotations,
|
||||||
type.abbreviation?.remapTypeAbbreviation()
|
type.abbreviation?.remapTypeAbbreviation()
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ import org.jetbrains.kotlin.ir.descriptors.IrBasedTypeParameterDescriptor
|
|||||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||||
import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
|
import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.IrTypeAbbreviation
|
|
||||||
import org.jetbrains.kotlin.ir.types.IrTypeProjection
|
|
||||||
import org.jetbrains.kotlin.ir.types.impl.*
|
import org.jetbrains.kotlin.ir.types.impl.*
|
||||||
import org.jetbrains.kotlin.types.*
|
import org.jetbrains.kotlin.types.*
|
||||||
import org.jetbrains.kotlin.types.typeUtil.replaceArgumentsWithStarProjections
|
import org.jetbrains.kotlin.types.typeUtil.replaceArgumentsWithStarProjections
|
||||||
@@ -101,7 +99,7 @@ abstract class TypeTranslator(
|
|||||||
approximatedType.isDynamic() ->
|
approximatedType.isDynamic() ->
|
||||||
return IrDynamicTypeImpl(approximatedType, translateTypeAnnotations(approximatedType), variance)
|
return IrDynamicTypeImpl(approximatedType, translateTypeAnnotations(approximatedType), variance)
|
||||||
supportDefinitelyNotNullTypes && approximatedType is DefinitelyNotNullType ->
|
supportDefinitelyNotNullTypes && approximatedType is DefinitelyNotNullType ->
|
||||||
return makeTypeProjection(IrDefinitelyNotNullTypeImpl(approximatedType, translateType(approximatedType.original)), variance)
|
return makeTypeProjection(translateType(approximatedType.original).makeNotNull(), variance)
|
||||||
}
|
}
|
||||||
|
|
||||||
val upperType = approximatedType.upperIfFlexible()
|
val upperType = approximatedType.upperIfFlexible()
|
||||||
@@ -121,7 +119,7 @@ abstract class TypeTranslator(
|
|||||||
|
|
||||||
return IrSimpleTypeBuilder().apply {
|
return IrSimpleTypeBuilder().apply {
|
||||||
this.kotlinType = approximatedType
|
this.kotlinType = approximatedType
|
||||||
this.hasQuestionMark = upperType.isMarkedNullable
|
this.nullability = SimpleTypeNullability.fromHasQuestionMark(upperType.isMarkedNullable)
|
||||||
this.variance = variance
|
this.variance = variance
|
||||||
this.abbreviation = upperType.getAbbreviation()?.toIrTypeAbbreviation()
|
this.abbreviation = upperType.getAbbreviation()?.toIrTypeAbbreviation()
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
|||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.expressions.*
|
import org.jetbrains.kotlin.ir.expressions.*
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
||||||
|
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
@@ -422,14 +423,14 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
// TODO don't print `Any?` as upper bound?
|
// TODO don't print `Any?` as upper bound?
|
||||||
printAnnotationsWithNoIndent()
|
printAnnotationsWithNoIndent()
|
||||||
when (this) {
|
when (this) {
|
||||||
is IrDefinitelyNotNullType -> {
|
|
||||||
p.printWithNoIndent("(")
|
|
||||||
original.printTypeWithNoIndent()
|
|
||||||
p.printWithNoIndent(" & Any)")
|
|
||||||
}
|
|
||||||
is IrSimpleType -> {
|
is IrSimpleType -> {
|
||||||
// TODO abbreviation
|
// TODO abbreviation
|
||||||
|
|
||||||
|
val dnn = classifier is IrTypeParameterSymbol && nullability == SimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
|
if (dnn) {
|
||||||
|
p.printWithNoIndent("(")
|
||||||
|
}
|
||||||
|
|
||||||
p.printWithNoIndent((classifier.owner as IrDeclarationWithName).name.asString())
|
p.printWithNoIndent((classifier.owner as IrDeclarationWithName).name.asString())
|
||||||
|
|
||||||
if (arguments.isNotEmpty()) {
|
if (arguments.isNotEmpty()) {
|
||||||
@@ -442,7 +443,11 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
p.printWithNoIndent(">")
|
p.printWithNoIndent(">")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasQuestionMark) p.printWithNoIndent("?")
|
if (dnn) {
|
||||||
|
p.printWithNoIndent(" & Any)")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isMarkedNullable()) p.printWithNoIndent("?")
|
||||||
}
|
}
|
||||||
is IrDynamicType ->
|
is IrDynamicType ->
|
||||||
p.printWithNoIndent("dynamic")
|
p.printWithNoIndent("dynamic")
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ message Actual {
|
|||||||
// Note: IrTypeArgument [63..2 - IrType index | 1..0 - Variance]
|
// Note: IrTypeArgument [63..2 - IrType index | 1..0 - Variance]
|
||||||
// If x...xxx00 -> *
|
// If x...xxx00 -> *
|
||||||
|
|
||||||
message IrSimpleType {
|
message IrSimpleTypeLegacy {
|
||||||
repeated IrConstructorCall annotation = 1;
|
repeated IrConstructorCall annotation = 1;
|
||||||
required int64 classifier = 2;
|
required int64 classifier = 2;
|
||||||
required bool has_question_mark = 3;
|
required bool has_question_mark = 3;
|
||||||
@@ -88,6 +88,20 @@ message IrSimpleType {
|
|||||||
optional IrTypeAbbreviation abbreviation = 5;
|
optional IrTypeAbbreviation abbreviation = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum IrSimpleTypeNullability {
|
||||||
|
MARKED_NULLABLE = 0;
|
||||||
|
NOT_SPECIFIED = 1;
|
||||||
|
DEFINITELY_NOT_NULL = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message IrSimpleType {
|
||||||
|
repeated IrConstructorCall annotation = 1;
|
||||||
|
required int64 classifier = 2;
|
||||||
|
optional IrSimpleTypeNullability nullability = 3 [default=NOT_SPECIFIED];
|
||||||
|
repeated int64 argument = 4 [packed=true]; // 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
optional IrTypeAbbreviation abbreviation = 5;
|
||||||
|
}
|
||||||
|
|
||||||
message IrTypeAbbreviation {
|
message IrTypeAbbreviation {
|
||||||
repeated IrConstructorCall annotation = 1;
|
repeated IrConstructorCall annotation = 1;
|
||||||
required int64 type_alias = 2;
|
required int64 type_alias = 2;
|
||||||
@@ -110,10 +124,11 @@ message IrErrorType {
|
|||||||
|
|
||||||
message IrType {
|
message IrType {
|
||||||
oneof kind {
|
oneof kind {
|
||||||
IrSimpleType simple = 1;
|
IrSimpleTypeLegacy legacySimple = 1;
|
||||||
IrDynamicType dynamic = 2;
|
IrDynamicType dynamic = 2;
|
||||||
IrErrorType error = 3;
|
IrErrorType error = 3;
|
||||||
IrDefinitelyNotNullType dnn = 4;
|
IrDefinitelyNotNullType dnn = 4;
|
||||||
|
IrSimpleType simple = 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+28
-3
@@ -50,7 +50,9 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepr
|
|||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrLocalDelegatedProperty as ProtoLocalDelegatedProperty
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrLocalDelegatedProperty as ProtoLocalDelegatedProperty
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrMultiFieldValueClassRepresentation as ProtoIrMultiFieldValueClassRepresentation
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrMultiFieldValueClassRepresentation as ProtoIrMultiFieldValueClassRepresentation
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrProperty as ProtoProperty
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrProperty as ProtoProperty
|
||||||
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability as ProtoSimpleTypeNullablity
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType as ProtoSimpleType
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType as ProtoSimpleType
|
||||||
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy as ProtoSimpleTypeLegacy
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement as ProtoStatement
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement as ProtoStatement
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrType as ProtoType
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrType as ProtoType
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation as ProtoTypeAbbreviation
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation as ProtoTypeAbbreviation
|
||||||
@@ -110,6 +112,12 @@ class IrDeclarationDeserializer(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun deserializeSimpleTypeNullability(proto: ProtoSimpleTypeNullablity) = when (proto) {
|
||||||
|
ProtoSimpleTypeNullablity.MARKED_NULLABLE -> SimpleTypeNullability.MARKED_NULLABLE
|
||||||
|
ProtoSimpleTypeNullablity.NOT_SPECIFIED -> SimpleTypeNullability.NOT_SPECIFIED
|
||||||
|
ProtoSimpleTypeNullablity.DEFINITELY_NOT_NULL -> SimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
|
}
|
||||||
|
|
||||||
private fun deserializeSimpleType(proto: ProtoSimpleType): IrSimpleType {
|
private fun deserializeSimpleType(proto: ProtoSimpleType): IrSimpleType {
|
||||||
val symbol = checkSymbolType<IrClassifierSymbol>(deserializeIrSymbolAndRemap(proto.classifier))
|
val symbol = checkSymbolType<IrClassifierSymbol>(deserializeIrSymbolAndRemap(proto.classifier))
|
||||||
|
|
||||||
@@ -119,7 +127,23 @@ class IrDeclarationDeserializer(
|
|||||||
return IrSimpleTypeImpl(
|
return IrSimpleTypeImpl(
|
||||||
null,
|
null,
|
||||||
symbol,
|
symbol,
|
||||||
proto.hasQuestionMark,
|
deserializeSimpleTypeNullability(proto.nullability),
|
||||||
|
arguments,
|
||||||
|
annotations,
|
||||||
|
if (proto.hasAbbreviation()) deserializeTypeAbbreviation(proto.abbreviation) else null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun deserializeLegacySimpleType(proto: ProtoSimpleTypeLegacy): IrSimpleType {
|
||||||
|
val symbol = checkSymbolType<IrClassifierSymbol>(deserializeIrSymbolAndRemap(proto.classifier))
|
||||||
|
|
||||||
|
val arguments = proto.argumentList.map { deserializeIrTypeArgument(it) }
|
||||||
|
val annotations = deserializeAnnotations(proto.annotationList)
|
||||||
|
|
||||||
|
return IrSimpleTypeImpl(
|
||||||
|
null,
|
||||||
|
symbol,
|
||||||
|
SimpleTypeNullability.fromHasQuestionMark(proto.hasQuestionMark),
|
||||||
arguments,
|
arguments,
|
||||||
annotations,
|
annotations,
|
||||||
if (proto.hasAbbreviation()) deserializeTypeAbbreviation(proto.abbreviation) else null
|
if (proto.hasAbbreviation()) deserializeTypeAbbreviation(proto.abbreviation) else null
|
||||||
@@ -145,16 +169,17 @@ class IrDeclarationDeserializer(
|
|||||||
return IrErrorTypeImpl(null, annotations, Variance.INVARIANT)
|
return IrErrorTypeImpl(null, annotations, Variance.INVARIANT)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deserializeDefinitelyNotNullType(proto: ProtoDefinitelyNotNullType): IrDefinitelyNotNullType {
|
private fun deserializeDefinitelyNotNullType(proto: ProtoDefinitelyNotNullType): IrSimpleType {
|
||||||
assert(proto.typesCount == 1) { "Only DefinitelyNotNull type is now supported" }
|
assert(proto.typesCount == 1) { "Only DefinitelyNotNull type is now supported" }
|
||||||
// TODO support general case of intersection type
|
// TODO support general case of intersection type
|
||||||
return IrDefinitelyNotNullTypeImpl(null, deserializeIrType(proto.typesList[0]))
|
return deserializeIrType(proto.typesList[0]).makeNotNull() as IrSimpleType
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deserializeIrTypeData(proto: ProtoType): IrType {
|
private fun deserializeIrTypeData(proto: ProtoType): IrType {
|
||||||
return when (proto.kindCase) {
|
return when (proto.kindCase) {
|
||||||
DNN -> deserializeDefinitelyNotNullType(proto.dnn)
|
DNN -> deserializeDefinitelyNotNullType(proto.dnn)
|
||||||
SIMPLE -> deserializeSimpleType(proto.simple)
|
SIMPLE -> deserializeSimpleType(proto.simple)
|
||||||
|
LEGACYSIMPLE -> deserializeLegacySimpleType(proto.legacySimple)
|
||||||
DYNAMIC -> deserializeDynamicType(proto.dynamic)
|
DYNAMIC -> deserializeDynamicType(proto.dynamic)
|
||||||
ERROR -> deserializeErrorType(proto.error)
|
ERROR -> deserializeErrorType(proto.error)
|
||||||
else -> error("Unexpected IrType kind: ${proto.kindCase}")
|
else -> error("Unexpected IrType kind: ${proto.kindCase}")
|
||||||
|
|||||||
+13
-14
@@ -6,6 +6,7 @@
|
|||||||
package org.jetbrains.kotlin.backend.common.serialization
|
package org.jetbrains.kotlin.backend.common.serialization
|
||||||
|
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.encodings.*
|
import org.jetbrains.kotlin.backend.common.serialization.encodings.*
|
||||||
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability
|
||||||
import org.jetbrains.kotlin.descriptors.*
|
import org.jetbrains.kotlin.descriptors.*
|
||||||
import org.jetbrains.kotlin.ir.IrElement
|
import org.jetbrains.kotlin.ir.IrElement
|
||||||
import org.jetbrains.kotlin.ir.IrFileEntry
|
import org.jetbrains.kotlin.ir.IrFileEntry
|
||||||
@@ -52,7 +53,6 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall
|
|||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrContinue as ProtoContinue
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrContinue as ProtoContinue
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration as ProtoDeclaration
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration as ProtoDeclaration
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase as ProtoDeclarationBase
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase as ProtoDeclarationBase
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType as ProtoDefinitelyNotNullType
|
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDelegatingConstructorCall as ProtoDelegatingConstructorCall
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDelegatingConstructorCall as ProtoDelegatingConstructorCall
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDoWhile as ProtoDoWhile
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDoWhile as ProtoDoWhile
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicMemberExpression as ProtoDynamicMemberExpression
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicMemberExpression as ProtoDynamicMemberExpression
|
||||||
@@ -378,11 +378,19 @@ open class IrFileSerializer(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun serializeNullability(nullability: SimpleTypeNullability) = when (nullability) {
|
||||||
|
SimpleTypeNullability.MARKED_NULLABLE -> IrSimpleTypeNullability.MARKED_NULLABLE
|
||||||
|
SimpleTypeNullability.NOT_SPECIFIED -> IrSimpleTypeNullability.NOT_SPECIFIED
|
||||||
|
SimpleTypeNullability.DEFINITELY_NOT_NULL -> IrSimpleTypeNullability.DEFINITELY_NOT_NULL
|
||||||
|
}
|
||||||
|
|
||||||
private fun serializeSimpleType(type: IrSimpleType): ProtoSimpleType {
|
private fun serializeSimpleType(type: IrSimpleType): ProtoSimpleType {
|
||||||
val proto = ProtoSimpleType.newBuilder()
|
val proto = ProtoSimpleType.newBuilder()
|
||||||
.addAllAnnotation(serializeAnnotations(type.annotations))
|
.addAllAnnotation(serializeAnnotations(type.annotations))
|
||||||
.setClassifier(serializeIrSymbol(type.classifier))
|
.setClassifier(serializeIrSymbol(type.classifier))
|
||||||
.setHasQuestionMark(type.hasQuestionMark)
|
if (type.nullability != SimpleTypeNullability.NOT_SPECIFIED) {
|
||||||
|
proto.setNullability(serializeNullability(type.nullability))
|
||||||
|
}
|
||||||
type.abbreviation?.let { ta ->
|
type.abbreviation?.let { ta ->
|
||||||
proto.setAbbreviation(serializeIrTypeAbbreviation(ta))
|
proto.setAbbreviation(serializeIrTypeAbbreviation(ta))
|
||||||
}
|
}
|
||||||
@@ -411,17 +419,10 @@ open class IrFileSerializer(
|
|||||||
.addAllAnnotation(serializeAnnotations(type.annotations))
|
.addAllAnnotation(serializeAnnotations(type.annotations))
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
private fun serializeDefinitelyNotNullType(type: IrDefinitelyNotNullType): ProtoDefinitelyNotNullType =
|
|
||||||
ProtoDefinitelyNotNullType.newBuilder()
|
|
||||||
.addTypes(serializeIrType(type.original))
|
|
||||||
// .addTypes(serializeIrType(kotlin.Any))
|
|
||||||
.build()
|
|
||||||
|
|
||||||
private fun serializeIrTypeData(type: IrType): ProtoType {
|
private fun serializeIrTypeData(type: IrType): ProtoType {
|
||||||
val proto = ProtoType.newBuilder()
|
val proto = ProtoType.newBuilder()
|
||||||
when (type) {
|
when (type) {
|
||||||
is IrDefinitelyNotNullType ->
|
|
||||||
proto.dnn = serializeDefinitelyNotNullType(type)
|
|
||||||
is IrSimpleType ->
|
is IrSimpleType ->
|
||||||
proto.simple = serializeSimpleType(type)
|
proto.simple = serializeSimpleType(type)
|
||||||
is IrDynamicType ->
|
is IrDynamicType ->
|
||||||
@@ -437,7 +438,6 @@ open class IrFileSerializer(
|
|||||||
SIMPLE,
|
SIMPLE,
|
||||||
DYNAMIC,
|
DYNAMIC,
|
||||||
ERROR,
|
ERROR,
|
||||||
DEFINITELY_NOT_NULL
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class IrTypeArgumentKind {
|
enum class IrTypeArgumentKind {
|
||||||
@@ -449,7 +449,7 @@ open class IrFileSerializer(
|
|||||||
data class IrTypeKey(
|
data class IrTypeKey(
|
||||||
val kind: IrTypeKind,
|
val kind: IrTypeKind,
|
||||||
val classifier: IrClassifierSymbol?,
|
val classifier: IrClassifierSymbol?,
|
||||||
val hasQuestionMark: Boolean?,
|
val nullability: SimpleTypeNullability?,
|
||||||
val arguments: List<IrTypeArgumentKey>?,
|
val arguments: List<IrTypeArgumentKey>?,
|
||||||
val annotations: List<IrConstructorCall>,
|
val annotations: List<IrConstructorCall>,
|
||||||
val abbreviation: IrTypeAbbreviation?
|
val abbreviation: IrTypeAbbreviation?
|
||||||
@@ -463,17 +463,16 @@ open class IrFileSerializer(
|
|||||||
|
|
||||||
private val IrType.toIrTypeKey: IrTypeKey
|
private val IrType.toIrTypeKey: IrTypeKey
|
||||||
get() {
|
get() {
|
||||||
var type = this
|
val type = this
|
||||||
return IrTypeKey(
|
return IrTypeKey(
|
||||||
kind = when (this) {
|
kind = when (this) {
|
||||||
is IrDefinitelyNotNullType -> IrTypeKind.DEFINITELY_NOT_NULL.also { type = original }
|
|
||||||
is IrSimpleType -> IrTypeKind.SIMPLE
|
is IrSimpleType -> IrTypeKind.SIMPLE
|
||||||
is IrDynamicType -> IrTypeKind.DYNAMIC
|
is IrDynamicType -> IrTypeKind.DYNAMIC
|
||||||
is IrErrorType -> IrTypeKind.ERROR
|
is IrErrorType -> IrTypeKind.ERROR
|
||||||
else -> error("Unexpected IrType kind: $this")
|
else -> error("Unexpected IrType kind: $this")
|
||||||
},
|
},
|
||||||
classifier = type.classifierOrNull,
|
classifier = type.classifierOrNull,
|
||||||
hasQuestionMark = (type as? IrSimpleType)?.hasQuestionMark,
|
nullability = (type as? IrSimpleType)?.nullability,
|
||||||
arguments = (type as? IrSimpleType)?.arguments?.map { it.toIrTypeArgumentKey },
|
arguments = (type as? IrSimpleType)?.arguments?.map { it.toIrTypeArgumentKey },
|
||||||
annotations = type.annotations,
|
annotations = type.annotations,
|
||||||
abbreviation = (type as? IrSimpleType)?.abbreviation
|
abbreviation = (type as? IrSimpleType)?.abbreviation
|
||||||
|
|||||||
+2
-5
@@ -186,15 +186,12 @@ abstract class IrMangleComputer(protected val builder: StringBuilder, private va
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.hasQuestionMark) tBuilder.appendSignature(MangleConstant.Q_MARK)
|
//TODO
|
||||||
|
if (type.isMarkedNullable()) tBuilder.appendSignature(MangleConstant.Q_MARK)
|
||||||
|
|
||||||
mangleTypePlatformSpecific(type, tBuilder)
|
mangleTypePlatformSpecific(type, tBuilder)
|
||||||
}
|
}
|
||||||
is IrDynamicType -> tBuilder.appendSignature(MangleConstant.DYNAMIC_MARK)
|
is IrDynamicType -> tBuilder.appendSignature(MangleConstant.DYNAMIC_MARK)
|
||||||
is IrDefinitelyNotNullType -> {
|
|
||||||
// TODO mangle DNN type differently from original simple type?
|
|
||||||
mangleType(tBuilder, type.original)
|
|
||||||
}
|
|
||||||
is IrErrorType -> tBuilder.appendSignature(MangleConstant.ERROR_MARK)
|
is IrErrorType -> tBuilder.appendSignature(MangleConstant.ERROR_MARK)
|
||||||
else -> error("Unexpected type $type")
|
else -> error("Unexpected type $type")
|
||||||
}
|
}
|
||||||
|
|||||||
+38
-36
@@ -67,8 +67,15 @@ public final class IrSimpleType extends
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 24: {
|
case 24: {
|
||||||
bitField0_ |= 0x00000002;
|
int rawValue = input.readEnum();
|
||||||
hasQuestionMark_ = input.readBool();
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability value = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability.valueOf(rawValue);
|
||||||
|
if (value == null) {
|
||||||
|
unknownFieldsCodedOutput.writeRawVarint32(tag);
|
||||||
|
unknownFieldsCodedOutput.writeRawVarint32(rawValue);
|
||||||
|
} else {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
nullability_ = value;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 32: {
|
case 32: {
|
||||||
@@ -195,19 +202,19 @@ public final class IrSimpleType extends
|
|||||||
return classifier_;
|
return classifier_;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int HAS_QUESTION_MARK_FIELD_NUMBER = 3;
|
public static final int NULLABILITY_FIELD_NUMBER = 3;
|
||||||
private boolean hasQuestionMark_;
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability_;
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasHasQuestionMark() {
|
public boolean hasNullability() {
|
||||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
public boolean getHasQuestionMark() {
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability getNullability() {
|
||||||
return hasQuestionMark_;
|
return nullability_;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int ARGUMENT_FIELD_NUMBER = 4;
|
public static final int ARGUMENT_FIELD_NUMBER = 4;
|
||||||
@@ -263,7 +270,7 @@ public final class IrSimpleType extends
|
|||||||
private void initFields() {
|
private void initFields() {
|
||||||
annotation_ = java.util.Collections.emptyList();
|
annotation_ = java.util.Collections.emptyList();
|
||||||
classifier_ = 0L;
|
classifier_ = 0L;
|
||||||
hasQuestionMark_ = false;
|
nullability_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability.NOT_SPECIFIED;
|
||||||
argument_ = java.util.Collections.emptyList();
|
argument_ = java.util.Collections.emptyList();
|
||||||
abbreviation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance();
|
abbreviation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance();
|
||||||
}
|
}
|
||||||
@@ -277,10 +284,6 @@ public final class IrSimpleType extends
|
|||||||
memoizedIsInitialized = 0;
|
memoizedIsInitialized = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!hasHasQuestionMark()) {
|
|
||||||
memoizedIsInitialized = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < getAnnotationCount(); i++) {
|
for (int i = 0; i < getAnnotationCount(); i++) {
|
||||||
if (!getAnnotation(i).isInitialized()) {
|
if (!getAnnotation(i).isInitialized()) {
|
||||||
memoizedIsInitialized = 0;
|
memoizedIsInitialized = 0;
|
||||||
@@ -307,7 +310,7 @@ public final class IrSimpleType extends
|
|||||||
output.writeInt64(2, classifier_);
|
output.writeInt64(2, classifier_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
output.writeBool(3, hasQuestionMark_);
|
output.writeEnum(3, nullability_.getNumber());
|
||||||
}
|
}
|
||||||
if (getArgumentList().size() > 0) {
|
if (getArgumentList().size() > 0) {
|
||||||
output.writeRawVarint32(34);
|
output.writeRawVarint32(34);
|
||||||
@@ -338,7 +341,7 @@ public final class IrSimpleType extends
|
|||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeBoolSize(3, hasQuestionMark_);
|
.computeEnumSize(3, nullability_.getNumber());
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
int dataSize = 0;
|
int dataSize = 0;
|
||||||
@@ -456,7 +459,7 @@ public final class IrSimpleType extends
|
|||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
classifier_ = 0L;
|
classifier_ = 0L;
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
hasQuestionMark_ = false;
|
nullability_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability.NOT_SPECIFIED;
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
argument_ = java.util.Collections.emptyList();
|
argument_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
@@ -497,7 +500,7 @@ public final class IrSimpleType extends
|
|||||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
to_bitField0_ |= 0x00000002;
|
to_bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
result.hasQuestionMark_ = hasQuestionMark_;
|
result.nullability_ = nullability_;
|
||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
argument_ = java.util.Collections.unmodifiableList(argument_);
|
argument_ = java.util.Collections.unmodifiableList(argument_);
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
@@ -526,8 +529,8 @@ public final class IrSimpleType extends
|
|||||||
if (other.hasClassifier()) {
|
if (other.hasClassifier()) {
|
||||||
setClassifier(other.getClassifier());
|
setClassifier(other.getClassifier());
|
||||||
}
|
}
|
||||||
if (other.hasHasQuestionMark()) {
|
if (other.hasNullability()) {
|
||||||
setHasQuestionMark(other.getHasQuestionMark());
|
setNullability(other.getNullability());
|
||||||
}
|
}
|
||||||
if (!other.argument_.isEmpty()) {
|
if (!other.argument_.isEmpty()) {
|
||||||
if (argument_.isEmpty()) {
|
if (argument_.isEmpty()) {
|
||||||
@@ -552,10 +555,6 @@ public final class IrSimpleType extends
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!hasHasQuestionMark()) {
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < getAnnotationCount(); i++) {
|
for (int i = 0; i < getAnnotationCount(); i++) {
|
||||||
if (!getAnnotation(i).isInitialized()) {
|
if (!getAnnotation(i).isInitialized()) {
|
||||||
|
|
||||||
@@ -747,34 +746,37 @@ public final class IrSimpleType extends
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasQuestionMark_ ;
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability.NOT_SPECIFIED;
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasHasQuestionMark() {
|
public boolean hasNullability() {
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
public boolean getHasQuestionMark() {
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability getNullability() {
|
||||||
return hasQuestionMark_;
|
return nullability_;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
public Builder setHasQuestionMark(boolean value) {
|
public Builder setNullability(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
bitField0_ |= 0x00000004;
|
bitField0_ |= 0x00000004;
|
||||||
hasQuestionMark_ = value;
|
nullability_ = value;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
public Builder clearHasQuestionMark() {
|
public Builder clearNullability() {
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
hasQuestionMark_ = false;
|
nullability_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability.NOT_SPECIFIED;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
+945
@@ -0,0 +1,945 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy}
|
||||||
|
*/
|
||||||
|
public final class IrSimpleTypeLegacy extends
|
||||||
|
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
|
||||||
|
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy)
|
||||||
|
IrSimpleTypeLegacyOrBuilder {
|
||||||
|
// Use IrSimpleTypeLegacy.newBuilder() to construct.
|
||||||
|
private IrSimpleTypeLegacy(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
|
||||||
|
super(builder);
|
||||||
|
this.unknownFields = builder.getUnknownFields();
|
||||||
|
}
|
||||||
|
private IrSimpleTypeLegacy(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
|
||||||
|
|
||||||
|
private static final IrSimpleTypeLegacy defaultInstance;
|
||||||
|
public static IrSimpleTypeLegacy getDefaultInstance() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IrSimpleTypeLegacy getDefaultInstanceForType() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
|
||||||
|
private IrSimpleTypeLegacy(
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
initFields();
|
||||||
|
int mutable_bitField0_ = 0;
|
||||||
|
org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
|
||||||
|
org.jetbrains.kotlin.protobuf.ByteString.newOutput();
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
|
||||||
|
unknownFieldsOutput, 1);
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
default: {
|
||||||
|
if (!parseUnknownField(input, unknownFieldsCodedOutput,
|
||||||
|
extensionRegistry, tag)) {
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 10: {
|
||||||
|
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
|
||||||
|
mutable_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 16: {
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
classifier_ = input.readInt64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 24: {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
hasQuestionMark_ = input.readBool();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 32: {
|
||||||
|
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
|
argument_ = new java.util.ArrayList<java.lang.Long>();
|
||||||
|
mutable_bitField0_ |= 0x00000008;
|
||||||
|
}
|
||||||
|
argument_.add(input.readInt64());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 34: {
|
||||||
|
int length = input.readRawVarint32();
|
||||||
|
int limit = input.pushLimit(length);
|
||||||
|
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
|
||||||
|
argument_ = new java.util.ArrayList<java.lang.Long>();
|
||||||
|
mutable_bitField0_ |= 0x00000008;
|
||||||
|
}
|
||||||
|
while (input.getBytesUntilLimit() > 0) {
|
||||||
|
argument_.add(input.readInt64());
|
||||||
|
}
|
||||||
|
input.popLimit(limit);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 42: {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.Builder subBuilder = null;
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
subBuilder = abbreviation_.toBuilder();
|
||||||
|
}
|
||||||
|
abbreviation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.PARSER, extensionRegistry);
|
||||||
|
if (subBuilder != null) {
|
||||||
|
subBuilder.mergeFrom(abbreviation_);
|
||||||
|
abbreviation_ = subBuilder.buildPartial();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
|
||||||
|
e.getMessage()).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
annotation_ = java.util.Collections.unmodifiableList(annotation_);
|
||||||
|
}
|
||||||
|
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
|
argument_ = java.util.Collections.unmodifiableList(argument_);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
unknownFieldsCodedOutput.flush();
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
// Should not happen
|
||||||
|
} finally {
|
||||||
|
unknownFields = unknownFieldsOutput.toByteString();
|
||||||
|
}
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.protobuf.Parser<IrSimpleTypeLegacy> PARSER =
|
||||||
|
new org.jetbrains.kotlin.protobuf.AbstractParser<IrSimpleTypeLegacy>() {
|
||||||
|
public IrSimpleTypeLegacy parsePartialFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new IrSimpleTypeLegacy(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public org.jetbrains.kotlin.protobuf.Parser<IrSimpleTypeLegacy> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int ANNOTATION_FIELD_NUMBER = 1;
|
||||||
|
private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
|
||||||
|
return annotation_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
|
||||||
|
getAnnotationOrBuilderList() {
|
||||||
|
return annotation_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public int getAnnotationCount() {
|
||||||
|
return annotation_.size();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
|
||||||
|
return annotation_.get(index);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
|
||||||
|
int index) {
|
||||||
|
return annotation_.get(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int CLASSIFIER_FIELD_NUMBER = 2;
|
||||||
|
private long classifier_;
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasClassifier() {
|
||||||
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
public long getClassifier() {
|
||||||
|
return classifier_;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int HAS_QUESTION_MARK_FIELD_NUMBER = 3;
|
||||||
|
private boolean hasQuestionMark_;
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasHasQuestionMark() {
|
||||||
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean getHasQuestionMark() {
|
||||||
|
return hasQuestionMark_;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int ARGUMENT_FIELD_NUMBER = 4;
|
||||||
|
private java.util.List<java.lang.Long> argument_;
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public java.util.List<java.lang.Long>
|
||||||
|
getArgumentList() {
|
||||||
|
return argument_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public int getArgumentCount() {
|
||||||
|
return argument_.size();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public long getArgument(int index) {
|
||||||
|
return argument_.get(index);
|
||||||
|
}
|
||||||
|
private int argumentMemoizedSerializedSize = -1;
|
||||||
|
|
||||||
|
public static final int ABBREVIATION_FIELD_NUMBER = 5;
|
||||||
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation_;
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasAbbreviation() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation getAbbreviation() {
|
||||||
|
return abbreviation_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initFields() {
|
||||||
|
annotation_ = java.util.Collections.emptyList();
|
||||||
|
classifier_ = 0L;
|
||||||
|
hasQuestionMark_ = false;
|
||||||
|
argument_ = java.util.Collections.emptyList();
|
||||||
|
abbreviation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance();
|
||||||
|
}
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasClassifier()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasHasQuestionMark()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < getAnnotationCount(); i++) {
|
||||||
|
if (!getAnnotation(i).isInitialized()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasAbbreviation()) {
|
||||||
|
if (!getAbbreviation().isInitialized()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
getSerializedSize();
|
||||||
|
for (int i = 0; i < annotation_.size(); i++) {
|
||||||
|
output.writeMessage(1, annotation_.get(i));
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
output.writeInt64(2, classifier_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
output.writeBool(3, hasQuestionMark_);
|
||||||
|
}
|
||||||
|
if (getArgumentList().size() > 0) {
|
||||||
|
output.writeRawVarint32(34);
|
||||||
|
output.writeRawVarint32(argumentMemoizedSerializedSize);
|
||||||
|
}
|
||||||
|
for (int i = 0; i < argument_.size(); i++) {
|
||||||
|
output.writeInt64NoTag(argument_.get(i));
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
output.writeMessage(5, abbreviation_);
|
||||||
|
}
|
||||||
|
output.writeRawBytes(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int memoizedSerializedSize = -1;
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSerializedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
for (int i = 0; i < annotation_.size(); i++) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(1, annotation_.get(i));
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeInt64Size(2, classifier_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeBoolSize(3, hasQuestionMark_);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
int dataSize = 0;
|
||||||
|
for (int i = 0; i < argument_.size(); i++) {
|
||||||
|
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeInt64SizeNoTag(argument_.get(i));
|
||||||
|
}
|
||||||
|
size += dataSize;
|
||||||
|
if (!getArgumentList().isEmpty()) {
|
||||||
|
size += 1;
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeInt32SizeNoTag(dataSize);
|
||||||
|
}
|
||||||
|
argumentMemoizedSerializedSize = dataSize;
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(5, abbreviation_);
|
||||||
|
}
|
||||||
|
size += unknownFields.size();
|
||||||
|
memoizedSerializedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
@java.lang.Override
|
||||||
|
protected java.lang.Object writeReplace()
|
||||||
|
throws java.io.ObjectStreamException {
|
||||||
|
return super.writeReplace();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.ByteString data)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.ByteString data,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(byte[] data)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseDelimitedFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseDelimitedFrom(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parseFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Builder newBuilder() { return Builder.create(); }
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy prototype) {
|
||||||
|
return newBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
public Builder toBuilder() { return newBuilder(this); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy, Builder>
|
||||||
|
implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy)
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacyOrBuilder {
|
||||||
|
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
}
|
||||||
|
private static Builder create() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
annotation_ = java.util.Collections.emptyList();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
classifier_ = 0L;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
hasQuestionMark_ = false;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
argument_ = java.util.Collections.emptyList();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
|
abbreviation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clone() {
|
||||||
|
return create().mergeFrom(buildPartial());
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy getDefaultInstanceForType() {
|
||||||
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy build() {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy buildPartial() {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
annotation_ = java.util.Collections.unmodifiableList(annotation_);
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
}
|
||||||
|
result.annotation_ = annotation_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.classifier_ = classifier_;
|
||||||
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.hasQuestionMark_ = hasQuestionMark_;
|
||||||
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
|
argument_ = java.util.Collections.unmodifiableList(argument_);
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
|
}
|
||||||
|
result.argument_ = argument_;
|
||||||
|
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
||||||
|
to_bitField0_ |= 0x00000004;
|
||||||
|
}
|
||||||
|
result.abbreviation_ = abbreviation_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy other) {
|
||||||
|
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.getDefaultInstance()) return this;
|
||||||
|
if (!other.annotation_.isEmpty()) {
|
||||||
|
if (annotation_.isEmpty()) {
|
||||||
|
annotation_ = other.annotation_;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
} else {
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.addAll(other.annotation_);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (other.hasClassifier()) {
|
||||||
|
setClassifier(other.getClassifier());
|
||||||
|
}
|
||||||
|
if (other.hasHasQuestionMark()) {
|
||||||
|
setHasQuestionMark(other.getHasQuestionMark());
|
||||||
|
}
|
||||||
|
if (!other.argument_.isEmpty()) {
|
||||||
|
if (argument_.isEmpty()) {
|
||||||
|
argument_ = other.argument_;
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
|
} else {
|
||||||
|
ensureArgumentIsMutable();
|
||||||
|
argument_.addAll(other.argument_);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (other.hasAbbreviation()) {
|
||||||
|
mergeAbbreviation(other.getAbbreviation());
|
||||||
|
}
|
||||||
|
setUnknownFields(
|
||||||
|
getUnknownFields().concat(other.unknownFields));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasClassifier()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasHasQuestionMark()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < getAnnotationCount(); i++) {
|
||||||
|
if (!getAnnotation(i).isInitialized()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasAbbreviation()) {
|
||||||
|
if (!getAbbreviation().isInitialized()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) e.getUnfinishedMessage();
|
||||||
|
throw e;
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
|
||||||
|
java.util.Collections.emptyList();
|
||||||
|
private void ensureAnnotationIsMutable() {
|
||||||
|
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
|
||||||
|
return java.util.Collections.unmodifiableList(annotation_);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public int getAnnotationCount() {
|
||||||
|
return annotation_.size();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
|
||||||
|
return annotation_.get(index);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder setAnnotation(
|
||||||
|
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.set(index, value);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder setAnnotation(
|
||||||
|
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.set(index, builderForValue.build());
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.add(value);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder addAnnotation(
|
||||||
|
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.add(index, value);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder addAnnotation(
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.add(builderForValue.build());
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder addAnnotation(
|
||||||
|
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.add(index, builderForValue.build());
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder addAllAnnotation(
|
||||||
|
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
|
||||||
|
values, annotation_);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearAnnotation() {
|
||||||
|
annotation_ = java.util.Collections.emptyList();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder removeAnnotation(int index) {
|
||||||
|
ensureAnnotationIsMutable();
|
||||||
|
annotation_.remove(index);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long classifier_ ;
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasClassifier() {
|
||||||
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
public long getClassifier() {
|
||||||
|
return classifier_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
public Builder setClassifier(long value) {
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
classifier_ = value;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearClassifier() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
classifier_ = 0L;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hasQuestionMark_ ;
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasHasQuestionMark() {
|
||||||
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
public boolean getHasQuestionMark() {
|
||||||
|
return hasQuestionMark_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
public Builder setHasQuestionMark(boolean value) {
|
||||||
|
bitField0_ |= 0x00000004;
|
||||||
|
hasQuestionMark_ = value;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearHasQuestionMark() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
|
hasQuestionMark_ = false;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private java.util.List<java.lang.Long> argument_ = java.util.Collections.emptyList();
|
||||||
|
private void ensureArgumentIsMutable() {
|
||||||
|
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
|
argument_ = new java.util.ArrayList<java.lang.Long>(argument_);
|
||||||
|
bitField0_ |= 0x00000008;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public java.util.List<java.lang.Long>
|
||||||
|
getArgumentList() {
|
||||||
|
return java.util.Collections.unmodifiableList(argument_);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public int getArgumentCount() {
|
||||||
|
return argument_.size();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public long getArgument(int index) {
|
||||||
|
return argument_.get(index);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder setArgument(
|
||||||
|
int index, long value) {
|
||||||
|
ensureArgumentIsMutable();
|
||||||
|
argument_.set(index, value);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder addArgument(long value) {
|
||||||
|
ensureArgumentIsMutable();
|
||||||
|
argument_.add(value);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder addAllArgument(
|
||||||
|
java.lang.Iterable<? extends java.lang.Long> values) {
|
||||||
|
ensureArgumentIsMutable();
|
||||||
|
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
|
||||||
|
values, argument_);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
public Builder clearArgument() {
|
||||||
|
argument_ = java.util.Collections.emptyList();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasAbbreviation() {
|
||||||
|
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation getAbbreviation() {
|
||||||
|
return abbreviation_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder setAbbreviation(org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
abbreviation_ = value;
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder setAbbreviation(
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.Builder builderForValue) {
|
||||||
|
abbreviation_ = builderForValue.build();
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder mergeAbbreviation(org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation value) {
|
||||||
|
if (((bitField0_ & 0x00000010) == 0x00000010) &&
|
||||||
|
abbreviation_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance()) {
|
||||||
|
abbreviation_ =
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.newBuilder(abbreviation_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
abbreviation_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000010;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearAbbreviation() {
|
||||||
|
abbreviation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance();
|
||||||
|
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000010);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy)
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
defaultInstance = new IrSimpleTypeLegacy(true);
|
||||||
|
defaultInstance.initFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy)
|
||||||
|
}
|
||||||
+75
@@ -0,0 +1,75 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
||||||
|
|
||||||
|
public interface IrSimpleTypeLegacyOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy)
|
||||||
|
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
|
||||||
|
getAnnotationList();
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);
|
||||||
|
/**
|
||||||
|
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
|
||||||
|
*/
|
||||||
|
int getAnnotationCount();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
boolean hasClassifier();
|
||||||
|
/**
|
||||||
|
* <code>required int64 classifier = 2;</code>
|
||||||
|
*/
|
||||||
|
long getClassifier();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
boolean hasHasQuestionMark();
|
||||||
|
/**
|
||||||
|
* <code>required bool has_question_mark = 3;</code>
|
||||||
|
*/
|
||||||
|
boolean getHasQuestionMark();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
java.util.List<java.lang.Long> getArgumentList();
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
int getArgumentCount();
|
||||||
|
/**
|
||||||
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 0 - STAR, otherwise [63..2 - IrType index | 1..0 - Variance]
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
long getArgument(int index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
boolean hasAbbreviation();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
|
||||||
|
*/
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation getAbbreviation();
|
||||||
|
}
|
||||||
+69
@@ -0,0 +1,69 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf enum {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability}
|
||||||
|
*/
|
||||||
|
public enum IrSimpleTypeNullability
|
||||||
|
implements org.jetbrains.kotlin.protobuf.Internal.EnumLite {
|
||||||
|
/**
|
||||||
|
* <code>MARKED_NULLABLE = 0;</code>
|
||||||
|
*/
|
||||||
|
MARKED_NULLABLE(0, 0),
|
||||||
|
/**
|
||||||
|
* <code>NOT_SPECIFIED = 1;</code>
|
||||||
|
*/
|
||||||
|
NOT_SPECIFIED(1, 1),
|
||||||
|
/**
|
||||||
|
* <code>DEFINITELY_NOT_NULL = 2;</code>
|
||||||
|
*/
|
||||||
|
DEFINITELY_NOT_NULL(2, 2),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>MARKED_NULLABLE = 0;</code>
|
||||||
|
*/
|
||||||
|
public static final int MARKED_NULLABLE_VALUE = 0;
|
||||||
|
/**
|
||||||
|
* <code>NOT_SPECIFIED = 1;</code>
|
||||||
|
*/
|
||||||
|
public static final int NOT_SPECIFIED_VALUE = 1;
|
||||||
|
/**
|
||||||
|
* <code>DEFINITELY_NOT_NULL = 2;</code>
|
||||||
|
*/
|
||||||
|
public static final int DEFINITELY_NOT_NULL_VALUE = 2;
|
||||||
|
|
||||||
|
|
||||||
|
public final int getNumber() { return value; }
|
||||||
|
|
||||||
|
public static IrSimpleTypeNullability valueOf(int value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0: return MARKED_NULLABLE;
|
||||||
|
case 1: return NOT_SPECIFIED;
|
||||||
|
case 2: return DEFINITELY_NOT_NULL;
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap<IrSimpleTypeNullability>
|
||||||
|
internalGetValueMap() {
|
||||||
|
return internalValueMap;
|
||||||
|
}
|
||||||
|
private static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap<IrSimpleTypeNullability>
|
||||||
|
internalValueMap =
|
||||||
|
new org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap<IrSimpleTypeNullability>() {
|
||||||
|
public IrSimpleTypeNullability findValueByNumber(int number) {
|
||||||
|
return IrSimpleTypeNullability.valueOf(number);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private final int value;
|
||||||
|
|
||||||
|
private IrSimpleTypeNullability(int index, int value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability)
|
||||||
|
}
|
||||||
+4
-4
@@ -31,13 +31,13 @@ public interface IrSimpleTypeOrBuilder extends
|
|||||||
long getClassifier();
|
long getClassifier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
boolean hasHasQuestionMark();
|
boolean hasNullability();
|
||||||
/**
|
/**
|
||||||
* <code>required bool has_question_mark = 3;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability nullability = 3 [default = NOT_SPECIFIED];</code>
|
||||||
*/
|
*/
|
||||||
boolean getHasQuestionMark();
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeNullability getNullability();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>repeated int64 argument = 4 [packed = true];</code>
|
* <code>repeated int64 argument = 4 [packed = true];</code>
|
||||||
|
|||||||
+160
-38
@@ -54,13 +54,13 @@ public final class IrType extends
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 10: {
|
case 10: {
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.Builder subBuilder = null;
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.Builder subBuilder = null;
|
||||||
if (kindCase_ == 1) {
|
if (kindCase_ == 1) {
|
||||||
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_).toBuilder();
|
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) kind_).toBuilder();
|
||||||
}
|
}
|
||||||
kind_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.PARSER, extensionRegistry);
|
kind_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.PARSER, extensionRegistry);
|
||||||
if (subBuilder != null) {
|
if (subBuilder != null) {
|
||||||
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_);
|
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) kind_);
|
||||||
kind_ = subBuilder.buildPartial();
|
kind_ = subBuilder.buildPartial();
|
||||||
}
|
}
|
||||||
kindCase_ = 1;
|
kindCase_ = 1;
|
||||||
@@ -105,6 +105,19 @@ public final class IrType extends
|
|||||||
kindCase_ = 4;
|
kindCase_ = 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 42: {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.Builder subBuilder = null;
|
||||||
|
if (kindCase_ == 5) {
|
||||||
|
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_).toBuilder();
|
||||||
|
}
|
||||||
|
kind_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.PARSER, extensionRegistry);
|
||||||
|
if (subBuilder != null) {
|
||||||
|
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_);
|
||||||
|
kind_ = subBuilder.buildPartial();
|
||||||
|
}
|
||||||
|
kindCase_ = 5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -143,10 +156,11 @@ public final class IrType extends
|
|||||||
private java.lang.Object kind_;
|
private java.lang.Object kind_;
|
||||||
public enum KindCase
|
public enum KindCase
|
||||||
implements org.jetbrains.kotlin.protobuf.Internal.EnumLite {
|
implements org.jetbrains.kotlin.protobuf.Internal.EnumLite {
|
||||||
SIMPLE(1),
|
LEGACYSIMPLE(1),
|
||||||
DYNAMIC(2),
|
DYNAMIC(2),
|
||||||
ERROR(3),
|
ERROR(3),
|
||||||
DNN(4),
|
DNN(4),
|
||||||
|
SIMPLE(5),
|
||||||
KIND_NOT_SET(0);
|
KIND_NOT_SET(0);
|
||||||
private int value = 0;
|
private int value = 0;
|
||||||
private KindCase(int value) {
|
private KindCase(int value) {
|
||||||
@@ -154,10 +168,11 @@ public final class IrType extends
|
|||||||
}
|
}
|
||||||
public static KindCase valueOf(int value) {
|
public static KindCase valueOf(int value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 1: return SIMPLE;
|
case 1: return LEGACYSIMPLE;
|
||||||
case 2: return DYNAMIC;
|
case 2: return DYNAMIC;
|
||||||
case 3: return ERROR;
|
case 3: return ERROR;
|
||||||
case 4: return DNN;
|
case 4: return DNN;
|
||||||
|
case 5: return SIMPLE;
|
||||||
case 0: return KIND_NOT_SET;
|
case 0: return KIND_NOT_SET;
|
||||||
default: throw new java.lang.IllegalArgumentException(
|
default: throw new java.lang.IllegalArgumentException(
|
||||||
"Value is undefined for this oneof enum.");
|
"Value is undefined for this oneof enum.");
|
||||||
@@ -174,21 +189,21 @@ public final class IrType extends
|
|||||||
kindCase_);
|
kindCase_);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int SIMPLE_FIELD_NUMBER = 1;
|
public static final int LEGACYSIMPLE_FIELD_NUMBER = 1;
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasSimple() {
|
public boolean hasLegacySimple() {
|
||||||
return kindCase_ == 1;
|
return kindCase_ == 1;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType getSimple() {
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy getLegacySimple() {
|
||||||
if (kindCase_ == 1) {
|
if (kindCase_ == 1) {
|
||||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_;
|
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) kind_;
|
||||||
}
|
}
|
||||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance();
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.getDefaultInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int DYNAMIC_FIELD_NUMBER = 2;
|
public static final int DYNAMIC_FIELD_NUMBER = 2;
|
||||||
@@ -242,6 +257,23 @@ public final class IrType extends
|
|||||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType.getDefaultInstance();
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType.getDefaultInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int SIMPLE_FIELD_NUMBER = 5;
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasSimple() {
|
||||||
|
return kindCase_ == 5;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType getSimple() {
|
||||||
|
if (kindCase_ == 5) {
|
||||||
|
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_;
|
||||||
|
}
|
||||||
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@@ -250,8 +282,8 @@ public final class IrType extends
|
|||||||
if (isInitialized == 1) return true;
|
if (isInitialized == 1) return true;
|
||||||
if (isInitialized == 0) return false;
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
if (hasSimple()) {
|
if (hasLegacySimple()) {
|
||||||
if (!getSimple().isInitialized()) {
|
if (!getLegacySimple().isInitialized()) {
|
||||||
memoizedIsInitialized = 0;
|
memoizedIsInitialized = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -268,6 +300,12 @@ public final class IrType extends
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hasSimple()) {
|
||||||
|
if (!getSimple().isInitialized()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
memoizedIsInitialized = 1;
|
memoizedIsInitialized = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -276,7 +314,7 @@ public final class IrType extends
|
|||||||
throws java.io.IOException {
|
throws java.io.IOException {
|
||||||
getSerializedSize();
|
getSerializedSize();
|
||||||
if (kindCase_ == 1) {
|
if (kindCase_ == 1) {
|
||||||
output.writeMessage(1, (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_);
|
output.writeMessage(1, (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) kind_);
|
||||||
}
|
}
|
||||||
if (kindCase_ == 2) {
|
if (kindCase_ == 2) {
|
||||||
output.writeMessage(2, (org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType) kind_);
|
output.writeMessage(2, (org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType) kind_);
|
||||||
@@ -287,6 +325,9 @@ public final class IrType extends
|
|||||||
if (kindCase_ == 4) {
|
if (kindCase_ == 4) {
|
||||||
output.writeMessage(4, (org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType) kind_);
|
output.writeMessage(4, (org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType) kind_);
|
||||||
}
|
}
|
||||||
|
if (kindCase_ == 5) {
|
||||||
|
output.writeMessage(5, (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_);
|
||||||
|
}
|
||||||
output.writeRawBytes(unknownFields);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,7 +339,7 @@ public final class IrType extends
|
|||||||
size = 0;
|
size = 0;
|
||||||
if (kindCase_ == 1) {
|
if (kindCase_ == 1) {
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(1, (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_);
|
.computeMessageSize(1, (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) kind_);
|
||||||
}
|
}
|
||||||
if (kindCase_ == 2) {
|
if (kindCase_ == 2) {
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
@@ -312,6 +353,10 @@ public final class IrType extends
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(4, (org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType) kind_);
|
.computeMessageSize(4, (org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType) kind_);
|
||||||
}
|
}
|
||||||
|
if (kindCase_ == 5) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(5, (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_);
|
||||||
|
}
|
||||||
size += unknownFields.size();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -443,6 +488,9 @@ public final class IrType extends
|
|||||||
if (kindCase_ == 4) {
|
if (kindCase_ == 4) {
|
||||||
result.kind_ = kind_;
|
result.kind_ = kind_;
|
||||||
}
|
}
|
||||||
|
if (kindCase_ == 5) {
|
||||||
|
result.kind_ = kind_;
|
||||||
|
}
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
result.kindCase_ = kindCase_;
|
result.kindCase_ = kindCase_;
|
||||||
return result;
|
return result;
|
||||||
@@ -451,8 +499,8 @@ public final class IrType extends
|
|||||||
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrType other) {
|
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrType other) {
|
||||||
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrType.getDefaultInstance()) return this;
|
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrType.getDefaultInstance()) return this;
|
||||||
switch (other.getKindCase()) {
|
switch (other.getKindCase()) {
|
||||||
case SIMPLE: {
|
case LEGACYSIMPLE: {
|
||||||
mergeSimple(other.getSimple());
|
mergeLegacySimple(other.getLegacySimple());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DYNAMIC: {
|
case DYNAMIC: {
|
||||||
@@ -467,6 +515,10 @@ public final class IrType extends
|
|||||||
mergeDnn(other.getDnn());
|
mergeDnn(other.getDnn());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SIMPLE: {
|
||||||
|
mergeSimple(other.getSimple());
|
||||||
|
break;
|
||||||
|
}
|
||||||
case KIND_NOT_SET: {
|
case KIND_NOT_SET: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -477,8 +529,8 @@ public final class IrType extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
if (hasSimple()) {
|
if (hasLegacySimple()) {
|
||||||
if (!getSimple().isInitialized()) {
|
if (!getLegacySimple().isInitialized()) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -495,6 +547,12 @@ public final class IrType extends
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hasSimple()) {
|
||||||
|
if (!getSimple().isInitialized()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -532,24 +590,24 @@ public final class IrType extends
|
|||||||
private int bitField0_;
|
private int bitField0_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public boolean hasSimple() {
|
public boolean hasLegacySimple() {
|
||||||
return kindCase_ == 1;
|
return kindCase_ == 1;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType getSimple() {
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy getLegacySimple() {
|
||||||
if (kindCase_ == 1) {
|
if (kindCase_ == 1) {
|
||||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_;
|
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) kind_;
|
||||||
}
|
}
|
||||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance();
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.getDefaultInstance();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public Builder setSimple(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType value) {
|
public Builder setLegacySimple(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy value) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
}
|
}
|
||||||
@@ -559,22 +617,22 @@ public final class IrType extends
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public Builder setSimple(
|
public Builder setLegacySimple(
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.Builder builderForValue) {
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.Builder builderForValue) {
|
||||||
kind_ = builderForValue.build();
|
kind_ = builderForValue.build();
|
||||||
|
|
||||||
kindCase_ = 1;
|
kindCase_ = 1;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public Builder mergeSimple(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType value) {
|
public Builder mergeLegacySimple(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy value) {
|
||||||
if (kindCase_ == 1 &&
|
if (kindCase_ == 1 &&
|
||||||
kind_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance()) {
|
kind_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.getDefaultInstance()) {
|
||||||
kind_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_)
|
kind_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy) kind_)
|
||||||
.mergeFrom(value).buildPartial();
|
.mergeFrom(value).buildPartial();
|
||||||
} else {
|
} else {
|
||||||
kind_ = value;
|
kind_ = value;
|
||||||
@@ -584,9 +642,9 @@ public final class IrType extends
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
public Builder clearSimple() {
|
public Builder clearLegacySimple() {
|
||||||
if (kindCase_ == 1) {
|
if (kindCase_ == 1) {
|
||||||
kindCase_ = 0;
|
kindCase_ = 0;
|
||||||
kind_ = null;
|
kind_ = null;
|
||||||
@@ -787,6 +845,70 @@ public final class IrType extends
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasSimple() {
|
||||||
|
return kindCase_ == 5;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType getSimple() {
|
||||||
|
if (kindCase_ == 5) {
|
||||||
|
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_;
|
||||||
|
}
|
||||||
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder setSimple(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
kind_ = value;
|
||||||
|
|
||||||
|
kindCase_ = 5;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder setSimple(
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.Builder builderForValue) {
|
||||||
|
kind_ = builderForValue.build();
|
||||||
|
|
||||||
|
kindCase_ = 5;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder mergeSimple(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType value) {
|
||||||
|
if (kindCase_ == 5 &&
|
||||||
|
kind_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance()) {
|
||||||
|
kind_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType) kind_)
|
||||||
|
.mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
kind_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
kindCase_ = 5;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearSimple() {
|
||||||
|
if (kindCase_ == 5) {
|
||||||
|
kindCase_ = 0;
|
||||||
|
kind_ = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrType)
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-4
@@ -8,13 +8,13 @@ public interface IrTypeOrBuilder extends
|
|||||||
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
boolean hasSimple();
|
boolean hasLegacySimple();
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy legacySimple = 1;</code>
|
||||||
*/
|
*/
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType getSimple();
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleTypeLegacy getLegacySimple();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType dynamic = 2;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType dynamic = 2;</code>
|
||||||
@@ -42,4 +42,13 @@ public interface IrTypeOrBuilder extends
|
|||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType dnn = 4;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType dnn = 4;</code>
|
||||||
*/
|
*/
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType getDnn();
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType getDnn();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
boolean hasSimple();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType simple = 5;</code>
|
||||||
|
*/
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType getSimple();
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ FILE fqName:foo fileName:/main.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:foo.Derived
|
$this: VALUE_PARAMETER name:<this> type:foo.Derived
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public open fun set (p0: @[FlexibleNullability] kotlin.Any?, p1: @[FlexibleNullability] kotlin.Any?): kotlin.Unit [operator] declared in java.lang.reflect.Field' type=kotlin.Unit origin=null
|
CALL 'public open fun set (p0: @[FlexibleNullability] kotlin.Any?, p1: @[FlexibleNullability] kotlin.Any?): kotlin.Unit [operator] declared in java.lang.reflect.Field' type=kotlin.Unit origin=null
|
||||||
$this: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=java.lang.reflect.Field origin=EXCLEXCL
|
$this: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.lang.reflect.Field origin=EXCLEXCL
|
||||||
<T0>: java.lang.reflect.Field
|
<T0>: java.lang.reflect.Field
|
||||||
arg0: CALL 'public final fun <get-javaField> (): java.lang.reflect.Field? declared in kotlin.reflect.jvm.ReflectJvmMapping' type=java.lang.reflect.Field? origin=GET_PROPERTY
|
arg0: CALL 'public final fun <get-javaField> (): java.lang.reflect.Field? declared in kotlin.reflect.jvm.ReflectJvmMapping' type=java.lang.reflect.Field? origin=GET_PROPERTY
|
||||||
$receiver: PROPERTY_REFERENCE 'protected/*protected and package*/ open a: @[FlexibleNullability] foo.A? [var]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] foo.A? visibility:protected/*protected and package*/' getter='protected/*protected and package*/ open fun <get-a> (): @[FlexibleNullability] foo.A? declared in foo.Derived' setter='protected/*protected and package*/ open fun <set-a> (<set-?>: @[FlexibleNullability] foo.A?): kotlin.Unit declared in foo.Derived' type=kotlin.reflect.KMutableProperty1<foo.Derived, @[FlexibleNullability] foo.A?> origin=null
|
$receiver: PROPERTY_REFERENCE 'protected/*protected and package*/ open a: @[FlexibleNullability] foo.A? [var]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] foo.A? visibility:protected/*protected and package*/' getter='protected/*protected and package*/ open fun <get-a> (): @[FlexibleNullability] foo.A? declared in foo.Derived' setter='protected/*protected and package*/ open fun <set-a> (<set-?>: @[FlexibleNullability] foo.A?): kotlin.Unit declared in foo.Derived' type=kotlin.reflect.KMutableProperty1<foo.Derived, @[FlexibleNullability] foo.A?> origin=null
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ FILE fqName:foo fileName:/main.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:foo.Derived
|
$this: VALUE_PARAMETER name:<this> type:foo.Derived
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public open fun set (p0: @[FlexibleNullability] kotlin.Any?, p1: @[FlexibleNullability] kotlin.Any?): kotlin.Unit [operator] declared in java.lang.reflect.Field' type=kotlin.Unit origin=EQ
|
CALL 'public open fun set (p0: @[FlexibleNullability] kotlin.Any?, p1: @[FlexibleNullability] kotlin.Any?): kotlin.Unit [operator] declared in java.lang.reflect.Field' type=kotlin.Unit origin=EQ
|
||||||
$this: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=java.lang.reflect.Field origin=EXCLEXCL
|
$this: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=java.lang.reflect.Field origin=EXCLEXCL
|
||||||
<T0>: java.lang.reflect.Field
|
<T0>: java.lang.reflect.Field
|
||||||
arg0: CALL 'public final fun <get-javaField> (): java.lang.reflect.Field? declared in kotlin.reflect.jvm.ReflectJvmMapping' type=java.lang.reflect.Field? origin=GET_PROPERTY
|
arg0: CALL 'public final fun <get-javaField> (): java.lang.reflect.Field? declared in kotlin.reflect.jvm.ReflectJvmMapping' type=java.lang.reflect.Field? origin=GET_PROPERTY
|
||||||
$receiver: PROPERTY_REFERENCE 'protected/*protected and package*/ final a [fake_override,var]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] foo.A? visibility:protected/*protected and package*/' getter=null setter=null type=kotlin.reflect.KMutableProperty1<foo.Derived, @[FlexibleNullability] foo.A?> origin=null
|
$receiver: PROPERTY_REFERENCE 'protected/*protected and package*/ final a [fake_override,var]' field='FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:a type:@[FlexibleNullability] foo.A? visibility:protected/*protected and package*/' getter=null setter=null type=kotlin.reflect.KMutableProperty1<foo.Derived, @[FlexibleNullability] foo.A?> origin=null
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ FILE fqName:<root> fileName:/dynamicExclExclOperator.kt
|
|||||||
VALUE_PARAMETER name:d index:0 type:dynamic
|
VALUE_PARAMETER name:d index:0 type:dynamic
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test (d: dynamic): dynamic declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test (d: dynamic): dynamic declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=dynamic origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=dynamic origin=EXCLEXCL
|
||||||
<T0>: dynamic
|
<T0>: dynamic
|
||||||
arg0: GET_VAR 'd: dynamic declared in <root>.test' type=dynamic origin=null
|
arg0: GET_VAR 'd: dynamic declared in <root>.test' type=dynamic origin=null
|
||||||
|
|||||||
@@ -78,4 +78,3 @@ value class TestInline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,4 +29,3 @@ value class Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,4 +58,3 @@ fun box(): String {
|
|||||||
}
|
}
|
||||||
return "OK"
|
return "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -97,4 +97,3 @@ fun test() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,4 +106,3 @@ value class InlineMutableSet : MutableSet<IT> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?): kotlin.Any declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?): kotlin.Any declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Any origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Any origin=EXCLEXCL
|
||||||
<T0>: kotlin.Any
|
<T0>: kotlin.Any
|
||||||
arg0: GET_VAR 'a: kotlin.Any? declared in <root>.test1' type=kotlin.Any? origin=null
|
arg0: GET_VAR 'a: kotlin.Any? declared in <root>.test1' type=kotlin.Any? origin=null
|
||||||
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Int
|
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Int
|
||||||
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): kotlin.Int declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): kotlin.Int declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Int origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Int origin=EXCLEXCL
|
||||||
<T0>: kotlin.Int
|
<T0>: kotlin.Int
|
||||||
arg0: BLOCK type=kotlin.Int? origin=SAFE_CALL
|
arg0: BLOCK type=kotlin.Int? origin=SAFE_CALL
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val]
|
||||||
@@ -30,8 +30,8 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
VALUE_PARAMETER name:a index:0 type:X of <root>.test3
|
VALUE_PARAMETER name:a index:0 type:X of <root>.test3
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test3 <X> (a: X of <root>.test3): {X of <root>.test3 & Any} declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test3 <X> (a: X of <root>.test3): {X of <root>.test3 & Any} declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type={X of <root>.test3 & Any} origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type={X of <root>.test3 & Any} origin=EXCLEXCL
|
||||||
<T0>: X of <root>.test3
|
<T0>: {X of <root>.test3 & Any}
|
||||||
arg0: GET_VAR 'a: X of <root>.test3 declared in <root>.test3' type=X of <root>.test3 origin=null
|
arg0: GET_VAR 'a: X of <root>.test3 declared in <root>.test3' type=X of <root>.test3 origin=null
|
||||||
FUN name:useString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
|
FUN name:useString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
|
||||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||||
@@ -45,7 +45,7 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String?
|
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String?
|
||||||
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
||||||
<T0>: kotlin.String
|
<T0>: kotlin.String
|
||||||
arg0: TYPE_OP type=kotlin.String? origin=IMPLICIT_CAST typeOperand=kotlin.String?
|
arg0: TYPE_OP type=kotlin.String? origin=IMPLICIT_CAST typeOperand=kotlin.String?
|
||||||
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
@@ -54,7 +54,7 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String?
|
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String?
|
||||||
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
then: CALL 'public final fun useString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
then: CALL 'public final fun useString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
s: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
s: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
||||||
<T0>: kotlin.String
|
<T0>: kotlin.String
|
||||||
arg0: TYPE_OP type=kotlin.String? origin=IMPLICIT_CAST typeOperand=kotlin.String?
|
arg0: TYPE_OP type=kotlin.String? origin=IMPLICIT_CAST typeOperand=kotlin.String?
|
||||||
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ fun test2(a: Any?): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun <X : Any?> test3(a: X): (X & Any) {
|
fun <X : Any?> test3(a: X): (X & Any) {
|
||||||
return CHECK_NOT_NULL<X>(arg0 = a)
|
return CHECK_NOT_NULL<(X & Any)>(arg0 = a)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun useString(s: String) {
|
fun useString(s: String) {
|
||||||
@@ -27,4 +27,3 @@ fun <X : Any?> test4(a: X) {
|
|||||||
a is String? -> useString(s = CHECK_NOT_NULL<String>(arg0 = a /*as String? */))
|
a is String? -> useString(s = CHECK_NOT_NULL<String>(arg0 = a /*as String? */))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -3,14 +3,14 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?): kotlin.Any declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?): kotlin.Any declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Any origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Any origin=EXCLEXCL
|
||||||
<T0>: kotlin.Any
|
<T0>: kotlin.Any
|
||||||
arg0: GET_VAR 'a: kotlin.Any? declared in <root>.test1' type=kotlin.Any? origin=null
|
arg0: GET_VAR 'a: kotlin.Any? declared in <root>.test1' type=kotlin.Any? origin=null
|
||||||
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Int
|
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Int
|
||||||
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
VALUE_PARAMETER name:a index:0 type:kotlin.Any?
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): kotlin.Int declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): kotlin.Int declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Int origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Int origin=EXCLEXCL
|
||||||
<T0>: kotlin.Int
|
<T0>: kotlin.Int
|
||||||
arg0: BLOCK type=kotlin.Int? origin=SAFE_CALL
|
arg0: BLOCK type=kotlin.Int? origin=SAFE_CALL
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val]
|
||||||
@@ -30,7 +30,7 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
VALUE_PARAMETER name:a index:0 type:X of <root>.test3
|
VALUE_PARAMETER name:a index:0 type:X of <root>.test3
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test3 <X> (a: X of <root>.test3): {X of <root>.test3 & Any} declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test3 <X> (a: X of <root>.test3): {X of <root>.test3 & Any} declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=X of <root>.test3 origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=X of <root>.test3 origin=EXCLEXCL
|
||||||
<T0>: X of <root>.test3
|
<T0>: X of <root>.test3
|
||||||
arg0: GET_VAR 'a: X of <root>.test3 declared in <root>.test3' type=X of <root>.test3 origin=null
|
arg0: GET_VAR 'a: X of <root>.test3 declared in <root>.test3' type=X of <root>.test3 origin=null
|
||||||
FUN name:useString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
|
FUN name:useString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
|
||||||
@@ -45,7 +45,7 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String?
|
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String?
|
||||||
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=X of <root>.test4 origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=X of <root>.test4 origin=EXCLEXCL
|
||||||
<T0>: X of <root>.test4
|
<T0>: X of <root>.test4
|
||||||
arg0: GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
arg0: GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
WHEN type=kotlin.Unit origin=IF
|
WHEN type=kotlin.Unit origin=IF
|
||||||
@@ -54,6 +54,6 @@ FILE fqName:<root> fileName:/bangbang.kt
|
|||||||
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
then: CALL 'public final fun useString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
then: CALL 'public final fun useString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
s: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
|
s: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=X of <root>.test4 origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=X of <root>.test4 origin=EXCLEXCL
|
||||||
<T0>: X of <root>.test4
|
<T0>: X of <root>.test4
|
||||||
arg0: GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
arg0: GET_VAR 'a: X of <root>.test4 declared in <root>.test4' type=X of <root>.test4 origin=null
|
||||||
|
|||||||
@@ -27,4 +27,3 @@ fun <X : Any?> test4(a: X) {
|
|||||||
a is String? -> useString(s = CHECK_NOT_NULL<X>(arg0 = a) /*as String */)
|
a is String? -> useString(s = CHECK_NOT_NULL<X>(arg0 = a) /*as String */)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ FILE fqName:<root> fileName:/exclExclOnPlatformType.kt
|
|||||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
||||||
<T0>: kotlin.String
|
<T0>: kotlin.String
|
||||||
arg0: CALL 'public open fun get (): T of java.lang.ref.WeakReference? [fake_override,operator] declared in java.lang.ref.WeakReference' type=kotlin.String? origin=null
|
arg0: CALL 'public open fun get (): T of java.lang.ref.WeakReference? [fake_override,operator] declared in java.lang.ref.WeakReference' type=kotlin.String? origin=null
|
||||||
$this: CONSTRUCTOR_CALL 'public constructor <init> (p0: @[FlexibleNullability] T of java.lang.ref.WeakReference?) declared in java.lang.ref.WeakReference' type=java.lang.ref.WeakReference<@[FlexibleNullability] kotlin.String?> origin=null
|
$this: CONSTRUCTOR_CALL 'public constructor <init> (p0: @[FlexibleNullability] T of java.lang.ref.WeakReference?) declared in java.lang.ref.WeakReference' type=java.lang.ref.WeakReference<@[FlexibleNullability] kotlin.String?> origin=null
|
||||||
<class: T>: @[FlexibleNullability] kotlin.String?
|
<class: T>: @[FlexibleNullability] kotlin.String?
|
||||||
p0: CONST String type=kotlin.String value=""
|
p0: CONST String type=kotlin.String value=""
|
||||||
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
||||||
<T0>: @[FlexibleNullability] kotlin.String
|
<T0>: @[FlexibleNullability] kotlin.String
|
||||||
arg0: CALL 'public open fun getProperty (p0: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in java.lang.System' type=@[FlexibleNullability] kotlin.String? origin=null
|
arg0: CALL 'public open fun getProperty (p0: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in java.lang.System' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||||
p0: CONST String type=kotlin.String value="abc"
|
p0: CONST String type=kotlin.String value="abc"
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ FILE fqName:<root> fileName:/exclExclOnPlatformType.kt
|
|||||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
||||||
<T0>: kotlin.String
|
<T0>: kotlin.String
|
||||||
arg0: CALL 'public open fun get (): @[EnhancedNullability] T of java.lang.ref.WeakReference? [fake_override] declared in java.lang.ref.WeakReference' type=@[EnhancedNullability] kotlin.String? origin=null
|
arg0: CALL 'public open fun get (): @[EnhancedNullability] T of java.lang.ref.WeakReference? [fake_override] declared in java.lang.ref.WeakReference' type=@[EnhancedNullability] kotlin.String? origin=null
|
||||||
$this: CONSTRUCTOR_CALL 'public constructor <init> (p0: @[FlexibleNullability] T of java.lang.ref.WeakReference?) declared in java.lang.ref.WeakReference' type=java.lang.ref.WeakReference<@[FlexibleNullability] kotlin.String?> origin=null
|
$this: CONSTRUCTOR_CALL 'public constructor <init> (p0: @[FlexibleNullability] T of java.lang.ref.WeakReference?) declared in java.lang.ref.WeakReference' type=java.lang.ref.WeakReference<@[FlexibleNullability] kotlin.String?> origin=null
|
||||||
<class: T>: @[FlexibleNullability] kotlin.String?
|
<class: T>: @[FlexibleNullability] kotlin.String?
|
||||||
p0: CONST String type=kotlin.String value=""
|
p0: CONST String type=kotlin.String value=""
|
||||||
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
CALL 'public final fun use (a: kotlin.Any): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||||
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
a: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
||||||
<T0>: kotlin.String
|
<T0>: kotlin.String
|
||||||
arg0: CALL 'public open fun getProperty (p0: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in java.lang.System' type=@[FlexibleNullability] kotlin.String? origin=null
|
arg0: CALL 'public open fun getProperty (p0: @[FlexibleNullability] kotlin.String?): @[FlexibleNullability] kotlin.String? declared in java.lang.System' type=@[FlexibleNullability] kotlin.String? origin=null
|
||||||
p0: CONST String type=kotlin.String value="abc"
|
p0: CONST String type=kotlin.String value="abc"
|
||||||
|
|||||||
@@ -5,4 +5,3 @@ fun test() {
|
|||||||
use(a = CHECK_NOT_NULL<String>(arg0 = WeakReference<@FlexibleNullability String?>(p0 = "").get()))
|
use(a = CHECK_NOT_NULL<String>(arg0 = WeakReference<@FlexibleNullability String?>(p0 = "").get()))
|
||||||
use(a = CHECK_NOT_NULL<String>(arg0 = getProperty(p0 = "abc")))
|
use(a = CHECK_NOT_NULL<String>(arg0 = getProperty(p0 = "abc")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ FILE fqName:<root> fileName:/eqeqRhsConditionPossiblyAffectingLhs.kt
|
|||||||
BRANCH
|
BRANCH
|
||||||
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double
|
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double
|
||||||
GET_VAR 'x: kotlin.Any declared in <root>.test' type=kotlin.Any origin=null
|
GET_VAR 'x: kotlin.Any declared in <root>.test' type=kotlin.Any origin=null
|
||||||
then: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL
|
then: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL
|
||||||
<T0>: kotlin.Nothing
|
<T0>: kotlin.Nothing
|
||||||
arg0: CONST Null type=kotlin.Nothing? value=null
|
arg0: CONST Null type=kotlin.Nothing? value=null
|
||||||
BRANCH
|
BRANCH
|
||||||
|
|||||||
+8
-8
@@ -65,7 +65,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1'
|
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1'
|
||||||
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function0<kotlin.Unit>
|
<T0>: kotlin.Function0<kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -78,7 +78,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a'
|
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a'
|
||||||
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function0<kotlin.Unit>
|
<T0>: kotlin.Function0<kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1a.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1a.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -91,7 +91,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b'
|
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b'
|
||||||
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function0<kotlin.Unit>
|
<T0>: kotlin.Function0<kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1b.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1b.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -104,7 +104,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2'
|
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2'
|
||||||
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function0<kotlin.String>
|
<T0>: kotlin.Function0<kotlin.String>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -117,7 +117,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a'
|
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a'
|
||||||
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function0<kotlin.String>
|
<T0>: kotlin.Function0<kotlin.String>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2a.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2a.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a' type=kotlin.reflect.KFunction1<kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -130,7 +130,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3'
|
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3'
|
||||||
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function1<kotlin.String, kotlin.Unit>
|
<T0>: kotlin.Function1<kotlin.String, kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function1<kotlin.String, kotlin.Unit> declared in <root>.test3.KConsumer' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function1<kotlin.String, kotlin.Unit> declared in <root>.test3.KConsumer' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -143,7 +143,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a'
|
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a'
|
||||||
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function1<kotlin.String, kotlin.Unit>
|
<T0>: kotlin.Function1<kotlin.String, kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function1<kotlin.String, kotlin.Unit> declared in <root>.test3a.KConsumer' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function1<kotlin.String, kotlin.Unit> declared in <root>.test3a.KConsumer' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -156,7 +156,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b'
|
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b'
|
||||||
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=EXCLEXCL
|
||||||
<T0>: kotlin.Function1<kotlin.String, kotlin.Unit>
|
<T0>: kotlin.Function1<kotlin.String, kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function1<kotlin.String, kotlin.Unit> declared in <root>.test3b.KConsumer' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function1<kotlin.String, kotlin.Unit> declared in <root>.test3b.KConsumer' type=kotlin.Function1<kotlin.String, kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b' type=kotlin.reflect.KFunction1<kotlin.Function1<kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
|
|||||||
+8
-8
@@ -65,7 +65,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1'
|
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1'
|
||||||
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
<T0>: kotlin.Function0<kotlin.Unit>
|
<T0>: kotlin.Function0<kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -78,7 +78,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a'
|
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a'
|
||||||
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
<T0>: kotlin.Function0<kotlin.Unit>
|
<T0>: kotlin.Function0<kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1a.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1a.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1a' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -91,7 +91,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b'
|
RETURN type=kotlin.Nothing from='local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b'
|
||||||
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
TYPE_OP type=<root>.KRunnable origin=SAM_CONVERSION typeOperand=<root>.KRunnable
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
<T0>: kotlin.Function0<kotlin.Unit>
|
<T0>: kotlin.Function0<kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1b.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.Unit> declared in <root>.test1b.KRunnable' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KRunnable (function: kotlin.Function0<kotlin.Unit>): <root>.KRunnable declared in <root>.test1b' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.Unit>, <root>.KRunnable> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -104,7 +104,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2'
|
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2'
|
||||||
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=null
|
||||||
<T0>: kotlin.Function0<kotlin.String>
|
<T0>: kotlin.Function0<kotlin.String>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -117,7 +117,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a'
|
RETURN type=kotlin.Nothing from='local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a'
|
||||||
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
TYPE_OP type=<root>.KSupplier<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KSupplier<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function0<kotlin.String> origin=null
|
||||||
<T0>: kotlin.Function0<kotlin.String>
|
<T0>: kotlin.Function0<kotlin.String>
|
||||||
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2a.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
arg0: GET_VAR 'function: kotlin.Function0<kotlin.String> declared in <root>.test2a.KSupplier' type=kotlin.Function0<kotlin.String> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KSupplier (function: kotlin.Function0<kotlin.String>): <root>.KSupplier<kotlin.String> declared in <root>.test2a' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function0<kotlin.String>, <root>.KSupplier<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -130,7 +130,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3'
|
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3'
|
||||||
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
||||||
<T0>: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>
|
<T0>: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> declared in <root>.test3.KConsumer' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> declared in <root>.test3.KConsumer' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -143,7 +143,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a'
|
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a'
|
||||||
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
||||||
<T0>: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>
|
<T0>: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> declared in <root>.test3a.KConsumer' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> declared in <root>.test3a.KConsumer' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3a' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
@@ -156,7 +156,7 @@ FILE fqName:<root> fileName:/funInterfaceConstructorReference.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b'
|
RETURN type=kotlin.Nothing from='local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b'
|
||||||
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
TYPE_OP type=<root>.KConsumer<kotlin.String> origin=SAM_CONVERSION typeOperand=<root>.KConsumer<kotlin.String>
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
||||||
<T0>: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>
|
<T0>: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>
|
||||||
arg0: GET_VAR 'function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> declared in <root>.test3b.KConsumer' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
arg0: GET_VAR 'function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> declared in <root>.test3b.KConsumer' type=kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit> origin=null
|
||||||
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
FUNCTION_REFERENCE 'local final fun KConsumer (function: kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>): <root>.KConsumer<kotlin.String> declared in <root>.test3b' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'function')] kotlin.Function1<@[ParameterName(name = 'x')] kotlin.String, kotlin.Unit>, <root>.KConsumer<kotlin.String>> origin=FUN_INTERFACE_CONSTRUCTOR_REFERENCE reflectionTarget=<same>
|
||||||
|
|||||||
-1
@@ -95,4 +95,3 @@ fun test3b(): KFunction<KConsumer<String>> {
|
|||||||
::KConsumer
|
::KConsumer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,4 +31,3 @@ fun <T : S?, S : Any?> test5(x: T, fn: Function1<S, Unit>) {
|
|||||||
EQEQ(arg0 = x, arg1 = null).not() -> fn.invoke(p1 = x)
|
EQEQ(arg0 = x, arg1 = null).not() -> fn.invoke(p1 = x)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ FILE fqName:<root> fileName:/kt30020.kt
|
|||||||
element: CONST Int type=kotlin.Int value=4
|
element: CONST Int type=kotlin.Int value=4
|
||||||
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
||||||
<T>: kotlin.Int
|
<T>: kotlin.Int
|
||||||
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
||||||
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
||||||
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.X? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.X? [val]
|
||||||
@@ -66,7 +66,7 @@ FILE fqName:<root> fileName:/kt30020.kt
|
|||||||
element: CONST Int type=kotlin.Int value=5
|
element: CONST Int type=kotlin.Int value=5
|
||||||
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
||||||
<T>: kotlin.Int
|
<T>: kotlin.Int
|
||||||
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
||||||
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
||||||
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.X? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.X? [val]
|
||||||
|
|||||||
+2
-2
@@ -51,7 +51,7 @@ FILE fqName:<root> fileName:/kt30020.kt
|
|||||||
element: CONST Int type=kotlin.Int value=4
|
element: CONST Int type=kotlin.Int value=4
|
||||||
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=PLUSEQ
|
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=PLUSEQ
|
||||||
<T>: kotlin.Int
|
<T>: kotlin.Int
|
||||||
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
||||||
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
||||||
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.X? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:<root>.X? [val]
|
||||||
@@ -69,7 +69,7 @@ FILE fqName:<root> fileName:/kt30020.kt
|
|||||||
element: CONST Int type=kotlin.Int value=5
|
element: CONST Int type=kotlin.Int value=5
|
||||||
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=PLUSEQ
|
CALL 'public final fun plusAssign <T> (element: T of kotlin.collections.CollectionsKt.plusAssign): kotlin.Unit [inline,operator] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=PLUSEQ
|
||||||
<T>: kotlin.Int
|
<T>: kotlin.Int
|
||||||
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
$receiver: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList<kotlin.Any> origin=EXCLEXCL
|
||||||
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
<T0>: kotlin.collections.MutableList<kotlin.Any>
|
||||||
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
arg0: BLOCK type=kotlin.collections.MutableList<kotlin.Any>? origin=SAFE_CALL
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.X? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:<root>.X? [val]
|
||||||
|
|||||||
+1
-1
@@ -4,6 +4,6 @@ FILE fqName:<root> fileName:/kt36963.kt
|
|||||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction0<kotlin.Unit>
|
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.reflect.KFunction0<kotlin.Unit>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun test (): kotlin.reflect.KFunction0<kotlin.Unit> declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun test (): kotlin.reflect.KFunction0<kotlin.Unit> declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=EXCLEXCL
|
||||||
<T0>: kotlin.reflect.KFunction0<kotlin.Unit>
|
<T0>: kotlin.reflect.KFunction0<kotlin.Unit>
|
||||||
arg0: FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
|
arg0: FUNCTION_REFERENCE 'public final fun foo (): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ FILE fqName:<root> fileName:/kt44993.kt
|
|||||||
VALUE_PARAMETER name:r index:0 type:<root>.KotlinBox<<root>.JavaBox>
|
VALUE_PARAMETER name:r index:0 type:<root>.KotlinBox<<root>.JavaBox>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun f (r: <root>.KotlinBox<<root>.JavaBox>): kotlin.String declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun f (r: <root>.KotlinBox<<root>.JavaBox>): kotlin.String declared in <root>'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.String origin=EXCLEXCL
|
||||||
<T0>: kotlin.String
|
<T0>: kotlin.String
|
||||||
arg0: BLOCK type=@[FlexibleNullability] kotlin.String? origin=SAFE_CALL
|
arg0: BLOCK type=@[FlexibleNullability] kotlin.String? origin=SAFE_CALL
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.JavaBox? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.JavaBox? [val]
|
||||||
|
|||||||
@@ -21,4 +21,3 @@ fun test5(x: Boolean): Boolean {
|
|||||||
fun test6(): Boolean {
|
fun test6(): Boolean {
|
||||||
return true.not()
|
return true.not()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ FILE fqName:<root> fileName:/AbstractMutableMap.kt
|
|||||||
VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out @[EnhancedNullability] V of <root>.MyMap>
|
VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out @[EnhancedNullability] V of <root>.MyMap>
|
||||||
FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>, p0:@[EnhancedNullability] K of <root>.MyMap, p1:@[EnhancedNullability] V of <root>.MyMap, p2:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] V of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>) returnType:V of <root>.MyMap? [fake_override]
|
FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>, p0:@[EnhancedNullability] K of <root>.MyMap, p1:@[EnhancedNullability] V of <root>.MyMap, p2:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] V of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>) returnType:V of <root>.MyMap? [fake_override]
|
||||||
overridden:
|
overridden:
|
||||||
public open fun merge (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] {@[EnhancedNullability] V of kotlin.collections.AbstractMutableMap & Any}, p2: @[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] {@[EnhancedNullability] V of kotlin.collections.AbstractMutableMap & Any}, in @[EnhancedNullability] {@[EnhancedNullability] V of kotlin.collections.AbstractMutableMap & Any}, out V of kotlin.collections.AbstractMutableMap?>): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap
|
public open fun merge (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] {V of kotlin.collections.AbstractMutableMap & Any}, p2: @[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] {V of kotlin.collections.AbstractMutableMap & Any}, in @[EnhancedNullability] {V of kotlin.collections.AbstractMutableMap & Any}, out V of kotlin.collections.AbstractMutableMap?>): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap
|
||||||
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>
|
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>
|
||||||
VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of <root>.MyMap
|
VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of <root>.MyMap
|
||||||
VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] V of <root>.MyMap
|
VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] V of <root>.MyMap
|
||||||
VALUE_PARAMETER name:p2 index:2 type:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] V of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>
|
VALUE_PARAMETER name:p2 index:2 type:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] V of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>
|
||||||
FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>, p0:@[EnhancedNullability] K of <root>.MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>) returnType:V of <root>.MyMap? [fake_override]
|
FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>, p0:@[EnhancedNullability] K of <root>.MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>) returnType:V of <root>.MyMap? [fake_override]
|
||||||
overridden:
|
overridden:
|
||||||
public open fun computeIfPresent (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, in @[EnhancedNullability] {@[EnhancedNullability] V of kotlin.collections.AbstractMutableMap & Any}, out V of kotlin.collections.AbstractMutableMap?>): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap
|
public open fun computeIfPresent (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, in @[EnhancedNullability] {V of kotlin.collections.AbstractMutableMap & Any}, out V of kotlin.collections.AbstractMutableMap?>): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap
|
||||||
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>
|
$this: VALUE_PARAMETER name:<this> type:kotlin.collections.MutableMap<K of kotlin.collections.MutableMap, V of kotlin.collections.MutableMap>
|
||||||
VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of <root>.MyMap
|
VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of <root>.MyMap
|
||||||
VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>
|
VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction<in @[EnhancedNullability] K of <root>.MyMap, in @[EnhancedNullability] V of <root>.MyMap, out V of <root>.MyMap?>
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ FILE fqName:<root> fileName:/AnnotationLoader.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:<root>.AnnotationLoader.loadAnnotation.<no name provided>
|
$this: VALUE_PARAMETER name:<this> type:<root>.AnnotationLoader.loadAnnotation.<no name provided>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR name:visitor type:<root>.Visitor [val]
|
VAR name:visitor type:<root>.Visitor [val]
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=<root>.Visitor origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=<root>.Visitor origin=EXCLEXCL
|
||||||
<T0>: <root>.Visitor
|
<T0>: <root>.Visitor
|
||||||
arg0: CALL 'public final fun loadAnnotation (): <root>.Visitor? declared in <root>.AnnotationLoader' type=<root>.Visitor? origin=null
|
arg0: CALL 'public final fun loadAnnotation (): <root>.Visitor? declared in <root>.AnnotationLoader' type=<root>.Visitor? origin=null
|
||||||
$this: GET_VAR '<this>: <root>.AnnotationLoader declared in <root>.AnnotationLoader.loadAnnotation' type=<root>.AnnotationLoader origin=null
|
$this: GET_VAR '<this>: <root>.AnnotationLoader declared in <root>.AnnotationLoader.loadAnnotation' type=<root>.AnnotationLoader origin=null
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ FILE fqName:<root> fileName:/AnnotationLoader.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:<root>.AnnotationLoader.loadAnnotation.<no name provided>
|
$this: VALUE_PARAMETER name:<this> type:<root>.AnnotationLoader.loadAnnotation.<no name provided>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
VAR name:visitor type:<root>.Visitor [val]
|
VAR name:visitor type:<root>.Visitor [val]
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=<root>.Visitor origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=<root>.Visitor origin=EXCLEXCL
|
||||||
<T0>: <root>.Visitor
|
<T0>: <root>.Visitor
|
||||||
arg0: CALL 'public final fun loadAnnotation (): <root>.Visitor? declared in <root>.AnnotationLoader' type=<root>.Visitor? origin=null
|
arg0: CALL 'public final fun loadAnnotation (): <root>.Visitor? declared in <root>.AnnotationLoader' type=<root>.Visitor? origin=null
|
||||||
$this: GET_VAR '<this>: <root>.AnnotationLoader declared in <root>.AnnotationLoader.loadAnnotation' type=<root>.AnnotationLoader origin=null
|
$this: GET_VAR '<this>: <root>.AnnotationLoader declared in <root>.AnnotationLoader.loadAnnotation' type=<root>.AnnotationLoader origin=null
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ FILE fqName:<root> fileName:/functionLiteralGenericSignature.kt
|
|||||||
VALUE_PARAMETER name:l index:0 type:kotlin.collections.MutableList<kotlin.Double>
|
VALUE_PARAMETER name:l index:0 type:kotlin.collections.MutableList<kotlin.Double>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun <no name provided> (l: kotlin.collections.MutableList<kotlin.Double>): kotlin.collections.MutableList<kotlin.Int> declared in <root>.mutableListFun'
|
RETURN type=kotlin.Nothing from='local final fun <no name provided> (l: kotlin.collections.MutableList<kotlin.Double>): kotlin.collections.MutableList<kotlin.Int> declared in <root>.mutableListFun'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.Nothing origin=EXCLEXCL
|
||||||
<T0>: kotlin.Nothing
|
<T0>: kotlin.Nothing
|
||||||
arg0: CONST Null type=kotlin.Nothing? value=null
|
arg0: CONST Null type=kotlin.Nothing? value=null
|
||||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-mutableListFun> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.collections.MutableList<kotlin.Double>, kotlin.collections.MutableList<kotlin.Int>>
|
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-mutableListFun> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.collections.MutableList<kotlin.Double>, kotlin.collections.MutableList<kotlin.Int>>
|
||||||
|
|||||||
-1
@@ -30,4 +30,3 @@ enum class ConfigurationParameter : Enum<ConfigurationParameter> {
|
|||||||
fun valueOf(value: String): ConfigurationParameter /* Synthetic body for ENUM_VALUEOF */
|
fun valueOf(value: String): ConfigurationParameter /* Synthetic body for ENUM_VALUEOF */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,4 +62,3 @@ var fn: Function1<A, Int>
|
|||||||
|
|
||||||
get
|
get
|
||||||
set
|
set
|
||||||
|
|
||||||
|
|||||||
@@ -8,4 +8,3 @@ suspend fun box() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,4 +14,3 @@ fun main() {
|
|||||||
elvisLike<String>(x = "", y = "").<get-length>() /*~> Unit */
|
elvisLike<String>(x = "", y = "").<get-length>() /*~> Unit */
|
||||||
elvisLike<String?>(x = null, y = "").<get-length>() /*~> Unit */
|
elvisLike<String?>(x = null, y = "").<get-length>() /*~> Unit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ FILE fqName:<root> fileName:/definitelyNonNullSAM.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun foo (): <root>.FIn<{S of <root>.Test & Any}> declared in <root>.Test'
|
RETURN type=kotlin.Nothing from='public final fun foo (): <root>.FIn<{S of <root>.Test & Any}> declared in <root>.Test'
|
||||||
TYPE_OP type=<root>.FIn<{S of <root>.Test & Any}> origin=SAM_CONVERSION typeOperand=<root>.FIn<{S of <root>.Test & Any}>
|
TYPE_OP type=<root>.FIn<{S of <root>.Test & Any}> origin=SAM_CONVERSION typeOperand=<root>.FIn<{S of <root>.Test & Any}>
|
||||||
FUN_EXPR type=kotlin.Function1<@[ParameterName(name = 'x')] {@[ParameterName(name = 'x')] S of <root>.Test & Any}, kotlin.Unit> origin=LAMBDA
|
FUN_EXPR type=kotlin.Function1<@[ParameterName(name = 'x')] {S of <root>.Test & Any}, kotlin.Unit> origin=LAMBDA
|
||||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (sx:{S of <root>.Test & Any}) returnType:kotlin.Unit
|
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (sx:{S of <root>.Test & Any}) returnType:kotlin.Unit
|
||||||
VALUE_PARAMETER name:sx index:0 type:{S of <root>.Test & Any}
|
VALUE_PARAMETER name:sx index:0 type:{S of <root>.Test & Any}
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ FILE fqName:<root> fileName:/main.kt
|
|||||||
VALUE_PARAMETER name:x index:0 type:T1 of <root>.B
|
VALUE_PARAMETER name:x index:0 type:T1 of <root>.B
|
||||||
FUN name:bar visibility:public modality:ABSTRACT <> ($this:<root>.B<T1 of <root>.B>, x:{T1 of <root>.B & Any}) returnType:{T1 of <root>.B & Any}
|
FUN name:bar visibility:public modality:ABSTRACT <> ($this:<root>.B<T1 of <root>.B>, x:{T1 of <root>.B & Any}) returnType:{T1 of <root>.B & Any}
|
||||||
overridden:
|
overridden:
|
||||||
public abstract fun bar (x: @[EnhancedNullability] {@[EnhancedNullability] T of <root>.A & Any}): @[EnhancedNullability] {@[EnhancedNullability] T of <root>.A & Any} declared in <root>.A
|
public abstract fun bar (x: @[EnhancedNullability] {T of <root>.A & Any}): @[EnhancedNullability] {T of <root>.A & Any} declared in <root>.A
|
||||||
$this: VALUE_PARAMETER name:<this> type:<root>.B<T1 of <root>.B>
|
$this: VALUE_PARAMETER name:<this> type:<root>.B<T1 of <root>.B>
|
||||||
VALUE_PARAMETER name:x index:0 type:{T1 of <root>.B & Any}
|
VALUE_PARAMETER name:x index:0 type:{T1 of <root>.B & Any}
|
||||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
||||||
$this: GET_VAR 'i: <root>.I<in {T of <root>.qux & Any}> declared in <root>.qux' type=<root>.I<in {T of <root>.qux & Any}> origin=null
|
$this: GET_VAR 'i: <root>.I<in {T of <root>.qux & Any}> declared in <root>.qux' type=<root>.I<in {T of <root>.qux & Any}> origin=null
|
||||||
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type={T of <root>.qux & Any} origin=EXCLEXCL
|
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type={T of <root>.qux & Any} origin=EXCLEXCL
|
||||||
<T0>: T of <root>.qux
|
<T0>: {T of <root>.qux & Any}
|
||||||
arg0: GET_VAR 't: T of <root>.qux declared in <root>.qux' type=T of <root>.qux origin=null
|
arg0: GET_VAR 't: T of <root>.qux declared in <root>.qux' type=T of <root>.qux origin=null
|
||||||
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.I<{TT of <root>.C & Any}>]
|
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.I<{TT of <root>.C & Any}>]
|
||||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C<TT of <root>.C>
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C<TT of <root>.C>
|
||||||
@@ -76,8 +76,8 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:<root>.C<TT of <root>.C>
|
$this: VALUE_PARAMETER name:<this> type:<root>.C<TT of <root>.C>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public final fun output (): {TT of <root>.C & Any} declared in <root>.C'
|
RETURN type=kotlin.Nothing from='public final fun output (): {TT of <root>.C & Any} declared in <root>.C'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type={TT of <root>.C & Any} origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type={TT of <root>.C & Any} origin=EXCLEXCL
|
||||||
<T0>: TT of <root>.C
|
<T0>: {TT of <root>.C & Any}
|
||||||
arg0: CALL 'public final fun <get-t> (): TT of <root>.C declared in <root>.C' type=TT of <root>.C origin=GET_PROPERTY
|
arg0: CALL 'public final fun <get-t> (): TT of <root>.C declared in <root>.C' type=TT of <root>.C origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: <root>.C<TT of <root>.C> declared in <root>.C.output' type=<root>.C<TT of <root>.C> origin=null
|
$this: GET_VAR '<this>: <root>.C<TT of <root>.C> declared in <root>.C.output' type=<root>.C<TT of <root>.C> origin=null
|
||||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||||
@@ -101,6 +101,6 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
||||||
$this: GET_VAR 'p2: T2 of <root>.foo2 declared in <root>.foo2' type=T2 of <root>.foo2 origin=null
|
$this: GET_VAR 'p2: T2 of <root>.foo2 declared in <root>.foo2' type=T2 of <root>.foo2 origin=null
|
||||||
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type={T1 of <root>.foo2 & Any} origin=EXCLEXCL
|
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type={T1 of <root>.foo2 & Any} origin=EXCLEXCL
|
||||||
<T0>: T1 of <root>.foo2
|
<T0>: {T1 of <root>.foo2 & Any}
|
||||||
arg0: GET_VAR 'p1: T1 of <root>.foo2 declared in <root>.foo2' type=T1 of <root>.foo2 origin=null
|
arg0: GET_VAR 'p1: T1 of <root>.foo2 declared in <root>.foo2' type=T1 of <root>.foo2 origin=null
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ fun <T : Any?> bar(i: I<out (T & Any)>): (T & Any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun <T : Any?> qux(t: T, i: I<in (T & Any)>) {
|
fun <T : Any?> qux(t: T, i: I<in (T & Any)>) {
|
||||||
i.input(t = CHECK_NOT_NULL<T>(arg0 = t))
|
i.input(t = CHECK_NOT_NULL<(T & Any)>(arg0 = t))
|
||||||
}
|
}
|
||||||
|
|
||||||
class C<TT : Any?> : I<(TT & Any)> {
|
class C<TT : Any?> : I<(TT & Any)> {
|
||||||
@@ -31,12 +31,11 @@ class C<TT : Any?> : I<(TT & Any)> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun output(): (TT & Any) {
|
override fun output(): (TT & Any) {
|
||||||
return CHECK_NOT_NULL<TT>(arg0 = <this>.<get-t>())
|
return CHECK_NOT_NULL<(TT & Any)>(arg0 = <this>.<get-t>())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <T1 : Any?, T2 : I<(T1 & Any)>> foo2(p1: T1, p2: T2) {
|
fun <T1 : Any?, T2 : I<(T1 & Any)>> foo2(p1: T1, p2: T2) {
|
||||||
p2.input(t = CHECK_NOT_NULL<T1>(arg0 = p1))
|
p2.input(t = CHECK_NOT_NULL<(T1 & Any)>(arg0 = p1))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
|
|||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
||||||
$this: GET_VAR 'i: <root>.I<in {T of <root>.qux & Any}> declared in <root>.qux' type=<root>.I<in {T of <root>.qux & Any}> origin=null
|
$this: GET_VAR 'i: <root>.I<in {T of <root>.qux & Any}> declared in <root>.qux' type=<root>.I<in {T of <root>.qux & Any}> origin=null
|
||||||
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=T of <root>.qux origin=EXCLEXCL
|
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=T of <root>.qux origin=EXCLEXCL
|
||||||
<T0>: T of <root>.qux
|
<T0>: T of <root>.qux
|
||||||
arg0: GET_VAR 't: T of <root>.qux declared in <root>.qux' type=T of <root>.qux origin=null
|
arg0: GET_VAR 't: T of <root>.qux declared in <root>.qux' type=T of <root>.qux origin=null
|
||||||
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.I<{TT of <root>.C & Any}>]
|
CLASS CLASS name:C modality:FINAL visibility:public superTypes:[<root>.I<{TT of <root>.C & Any}>]
|
||||||
@@ -76,7 +76,7 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:<root>.C<TT of <root>.C>
|
$this: VALUE_PARAMETER name:<this> type:<root>.C<TT of <root>.C>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='public open fun output (): {TT of <root>.C & Any} declared in <root>.C'
|
RETURN type=kotlin.Nothing from='public open fun output (): {TT of <root>.C & Any} declared in <root>.C'
|
||||||
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=TT of <root>.C origin=EXCLEXCL
|
CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=TT of <root>.C origin=EXCLEXCL
|
||||||
<T0>: TT of <root>.C
|
<T0>: TT of <root>.C
|
||||||
arg0: CALL 'public final fun <get-t> (): TT of <root>.C declared in <root>.C' type=TT of <root>.C origin=GET_PROPERTY
|
arg0: CALL 'public final fun <get-t> (): TT of <root>.C declared in <root>.C' type=TT of <root>.C origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: <root>.C<TT of <root>.C> declared in <root>.C.output' type=<root>.C<TT of <root>.C> origin=null
|
$this: GET_VAR '<this>: <root>.C<TT of <root>.C> declared in <root>.C.output' type=<root>.C<TT of <root>.C> origin=null
|
||||||
@@ -102,6 +102,6 @@ FILE fqName:<root> fileName:/definitelyNotNullAsArgument.kt
|
|||||||
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
CALL 'public abstract fun input (t: T of <root>.I): kotlin.Unit declared in <root>.I' type=kotlin.Unit origin=null
|
||||||
$this: TYPE_OP type=<root>.I<{T1 of <root>.foo2 & Any}> origin=IMPLICIT_CAST typeOperand=<root>.I<{T1 of <root>.foo2 & Any}>
|
$this: TYPE_OP type=<root>.I<{T1 of <root>.foo2 & Any}> origin=IMPLICIT_CAST typeOperand=<root>.I<{T1 of <root>.foo2 & Any}>
|
||||||
GET_VAR 'p2: T2 of <root>.foo2 declared in <root>.foo2' type=T2 of <root>.foo2 origin=null
|
GET_VAR 'p2: T2 of <root>.foo2 declared in <root>.foo2' type=T2 of <root>.foo2 origin=null
|
||||||
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): T0 of kotlin.internal.ir.CHECK_NOT_NULL declared in kotlin.internal.ir' type=T1 of <root>.foo2 origin=EXCLEXCL
|
t: CALL 'public final fun CHECK_NOT_NULL <T0> (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=T1 of <root>.foo2 origin=EXCLEXCL
|
||||||
<T0>: T1 of <root>.foo2
|
<T0>: T1 of <root>.foo2
|
||||||
arg0: GET_VAR 'p1: T1 of <root>.foo2 declared in <root>.foo2' type=T1 of <root>.foo2 origin=null
|
arg0: GET_VAR 'p1: T1 of <root>.foo2 declared in <root>.foo2' type=T1 of <root>.foo2 origin=null
|
||||||
|
|||||||
@@ -39,4 +39,3 @@ class C<TT : Any?> : I<(TT & Any)> {
|
|||||||
fun <T1 : Any?, T2 : I<(T1 & Any)>> foo2(p1: T1, p2: T2) {
|
fun <T1 : Any?, T2 : I<(T1 & Any)>> foo2(p1: T1, p2: T2) {
|
||||||
p2 /*as I<(T1 & Any)> */.input(t = CHECK_NOT_NULL<T1>(arg0 = p1))
|
p2 /*as I<(T1 & Any)> */.input(t = CHECK_NOT_NULL<T1>(arg0 = p1))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,4 +34,3 @@ fun testLocalVarUse() {
|
|||||||
val nns: String = notNullString() /*!! String */
|
val nns: String = notNullString() /*!! String */
|
||||||
use(s = nns)
|
use(s = nns)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,4 +15,3 @@ fun test(): String {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -37,4 +37,3 @@ class Delegated : IFoo {
|
|||||||
fun testReturnValue(): String {
|
fun testReturnValue(): String {
|
||||||
return Delegated().foo()
|
return Delegated().foo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-1
@@ -8,4 +8,3 @@ fun testNullCheck() {
|
|||||||
}
|
}
|
||||||
) /*~> Unit */
|
) /*~> Unit */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,4 +12,3 @@ inline fun <reified T : CharSequence?> implicitAsFoo(x: Any): Int {
|
|||||||
else -> x /*as (T & Any) */.<get-length>()
|
else -> x /*as (T & Any) */.<get-length>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.impl.*
|
import org.jetbrains.kotlin.ir.symbols.impl.*
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
|
import org.jetbrains.kotlin.ir.types.SimpleTypeNullability
|
||||||
import org.jetbrains.kotlin.ir.types.classOrNull
|
import org.jetbrains.kotlin.ir.types.classOrNull
|
||||||
import org.jetbrains.kotlin.ir.types.defaultType
|
import org.jetbrains.kotlin.ir.types.defaultType
|
||||||
import org.jetbrains.kotlin.ir.types.impl.*
|
import org.jetbrains.kotlin.ir.types.impl.*
|
||||||
@@ -289,7 +290,7 @@ internal class BuiltInFictitiousFunctionIrClassFactory(
|
|||||||
val kotlinType = wrapped.unwrap()
|
val kotlinType = wrapped.unwrap()
|
||||||
return with(IrSimpleTypeBuilder()) {
|
return with(IrSimpleTypeBuilder()) {
|
||||||
classifier = symbolTable.referenceClassifier(kotlinType.constructor.declarationDescriptor ?: error("No classifier for type $kotlinType"))
|
classifier = symbolTable.referenceClassifier(kotlinType.constructor.declarationDescriptor ?: error("No classifier for type $kotlinType"))
|
||||||
hasQuestionMark = kotlinType.isMarkedNullable
|
nullability = SimpleTypeNullability.fromHasQuestionMark(kotlinType.isMarkedNullable)
|
||||||
arguments = kotlinType.arguments.map {
|
arguments = kotlinType.arguments.map {
|
||||||
if (it.isStarProjection) IrStarProjectionImpl
|
if (it.isStarProjection) IrStarProjectionImpl
|
||||||
else makeTypeProjection(toIrType(it.type), it.projectionKind)
|
else makeTypeProjection(toIrType(it.type), it.projectionKind)
|
||||||
|
|||||||
+4
-6
@@ -23,9 +23,8 @@ import org.jetbrains.kotlin.name.FqName
|
|||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
|
||||||
internal fun IrType.isCEnumType(): Boolean {
|
internal fun IrType.isCEnumType(): Boolean {
|
||||||
val simpleType = this as? IrSimpleType ?: return false
|
if (isNullable()) return false
|
||||||
if (simpleType.hasQuestionMark) return false
|
val enumClass = classOrNull?.owner ?: return false
|
||||||
val enumClass = simpleType.classifier.owner as? IrClass ?: return false
|
|
||||||
if (!enumClass.isEnumClass) return false
|
if (!enumClass.isEnumClass) return false
|
||||||
|
|
||||||
return enumClass.superTypes
|
return enumClass.superTypes
|
||||||
@@ -53,11 +52,10 @@ internal fun IrSimpleFunction.objCReturnsRetained() = hasCCallAnnotation("Return
|
|||||||
internal fun IrClass.getCStructSpelling(): String? =
|
internal fun IrClass.getCStructSpelling(): String? =
|
||||||
getAnnotationArgumentValue(FqName("kotlinx.cinterop.internal.CStruct"), "spelling")
|
getAnnotationArgumentValue(FqName("kotlinx.cinterop.internal.CStruct"), "spelling")
|
||||||
|
|
||||||
internal fun IrType.isTypeOfNullLiteral(): Boolean = this is IrSimpleType && hasQuestionMark
|
internal fun IrType.isTypeOfNullLiteral(): Boolean = isNullableNothing()
|
||||||
&& classifier.isClassWithFqName(StandardNames.FqNames.nothing)
|
|
||||||
|
|
||||||
internal fun IrType.isVector(): Boolean {
|
internal fun IrType.isVector(): Boolean {
|
||||||
if (this is IrSimpleType && !this.hasQuestionMark) {
|
if (this is IrSimpleType && !this.isNullable()) {
|
||||||
return classifier.isClassWithFqName(KonanFqNames.Vector128.toUnsafe())
|
return classifier.isClassWithFqName(KonanFqNames.Vector128.toUnsafe())
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
+1
-2
@@ -1515,8 +1515,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
|||||||
!this.isChar()
|
!this.isChar()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun IrType.isUnsignedInteger(): Boolean =
|
private fun IrType.isUnsignedInteger(): Boolean = !isNullable() &&
|
||||||
this is IrSimpleType && !this.hasQuestionMark &&
|
|
||||||
UnsignedType.values().any { it.classId == this.getClass()?.descriptor?.classId }
|
UnsignedType.values().any { it.classId == this.getClass()?.descriptor?.classId }
|
||||||
|
|
||||||
private fun evaluateIntegerCoercion(value: IrTypeOperatorCall): LLVMValueRef {
|
private fun evaluateIntegerCoercion(value: IrTypeOperatorCall): LLVMValueRef {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user