Eliminate a set of warnings, mostly nullability ones
This commit is contained in:
committed by
Mikhail Glukhikh
parent
82fc221470
commit
3623f581b8
+1
-1
@@ -195,7 +195,7 @@ private fun Scope.createTemporaryVariable(symbol: IrVariableSymbol, initializer:
|
||||
}
|
||||
|
||||
private fun getDefaultParameterExpressionBody(irFunction: IrFunction, valueParameter: ValueParameterDescriptor):IrExpressionBody {
|
||||
return irFunction.getDefault(valueParameter) as? IrExpressionBody ?: TODO("FIXME!!!")
|
||||
return irFunction.getDefault(valueParameter) ?: TODO("FIXME!!!")
|
||||
}
|
||||
|
||||
private fun maskParameterDescriptor(function: IrFunction, number: Int) =
|
||||
|
||||
+2
-3
@@ -23,7 +23,6 @@ import org.jetbrains.kotlin.codegen.AsmUtil.comparisonOperandType
|
||||
import org.jetbrains.kotlin.codegen.AsmUtil.isPrimitive
|
||||
import org.jetbrains.kotlin.codegen.OwnerKind
|
||||
import org.jetbrains.kotlin.codegen.StackValue
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
import org.jetbrains.kotlin.ir.expressions.IrCall
|
||||
import org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression
|
||||
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
|
||||
@@ -68,10 +67,10 @@ class IrCompareTo : IntrinsicMethod() {
|
||||
val rightType = argTypes[1]
|
||||
val parameterType = comparisonOperandType(leftType, rightType)
|
||||
|
||||
val newSignature = context.state.typeMapper.mapSignatureSkipGeneric(compareCall.descriptor as FunctionDescriptor, OwnerKind.IMPLEMENTATION)
|
||||
val newSignature = context.state.typeMapper.mapSignatureSkipGeneric(compareCall.descriptor, OwnerKind.IMPLEMENTATION)
|
||||
return object : IrIntrinsicFunction(compareCall, newSignature, context, listOf(parameterType, parameterType)) {
|
||||
override fun invoke(v: InstructionAdapter, codegen: ExpressionCodegen, data: BlockInfo): StackValue {
|
||||
val isPrimitiveIntrinsic = codegen.intrinsics.intrinsics.getIntrinsic(compareCall.descriptor as FunctionDescriptor) != null
|
||||
val isPrimitiveIntrinsic = codegen.intrinsics.intrinsics.getIntrinsic(compareCall.descriptor) != null
|
||||
val operationType: Type
|
||||
val leftValue: StackValue
|
||||
val rightValue: StackValue
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ class ContextAnnotator(val state: GenerationState) : ClassLowerWithContext() {
|
||||
|
||||
override fun lowerBefore(irClass: IrClass, data: IrClassContext) {
|
||||
val descriptor = irClass.descriptor
|
||||
val newContext: CodegenContext<*> = if (descriptor is FileClassDescriptor || descriptor !is ClassDescriptor) {
|
||||
val newContext: CodegenContext<*> = if (descriptor is FileClassDescriptor) {
|
||||
StubCodegenContext(descriptor, data.parent?.codegenContext, data)
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -59,6 +59,6 @@ class IrFieldImpl(
|
||||
}
|
||||
|
||||
override fun <D> transformChildren(transformer: IrElementTransformer<D>, data: D) {
|
||||
initializer = initializer?.transform(transformer, data) as? IrExpressionBody
|
||||
initializer = initializer?.transform(transformer, data)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user