Fix minor compile warnings

This commit is contained in:
Dmitry Gridin
2019-04-17 17:48:26 +07:00
parent 79793a4bda
commit 37c856290f
226 changed files with 618 additions and 479 deletions
@@ -106,7 +106,6 @@ class BranchingExpressionGenerator(statementGenerator: StatementGenerator) : Sta
// TODO relies on ControlFlowInformationProvider, get rid of it
val isUsedAsExpression = get(BindingContext.USED_AS_EXPRESSION, expression) ?: false
val isExhaustive = expression.isExhaustiveWhen()
val resultType = when {
isUsedAsExpression -> inferredType.toIrType()
@@ -172,7 +172,7 @@ class CallGenerator(statementGenerator: StatementGenerator) : StatementGenerator
val irType = descriptor.type.toIrType()
return if (getMethodDescriptor == null) {
call.callReceiver.call { dispatchReceiverValue, extensionReceiverValue ->
call.callReceiver.call { dispatchReceiverValue, _ ->
val fieldSymbol = context.symbolTable.referenceField(descriptor.original)
IrGetFieldImpl(
startOffset, endOffset,
@@ -156,6 +156,7 @@ class ReflectionReferencesGenerator(statementGenerator: StatementGenerator) : St
private fun getFieldForPropertyReference(originalProperty: PropertyDescriptor) =
// NB this is a hack, we really don't know if an arbitrary property has a backing field or not
when {
@Suppress("DEPRECATION")
originalProperty.isDelegated -> null
originalProperty.getter != null -> null
else -> context.symbolTable.referenceField(originalProperty)