IR: Fix return types in IrConstImpl

This commit is contained in:
Steven Schäfer
2019-10-17 16:56:58 +02:00
committed by Dmitry Petrov
parent 2677fa7472
commit bc2b96f634
@@ -57,22 +57,22 @@ class IrConstImpl<T>(
fun constFalse(startOffset: Int, endOffset: Int, type: IrType): IrConstImpl<Boolean> = fun constFalse(startOffset: Int, endOffset: Int, type: IrType): IrConstImpl<Boolean> =
boolean(startOffset, endOffset, type, false) boolean(startOffset, endOffset, type, false)
fun long(startOffset: Int, endOffset: Int, type: IrType, value: Long): IrExpression = fun long(startOffset: Int, endOffset: Int, type: IrType, value: Long): IrConstImpl<Long> =
IrConstImpl(startOffset, endOffset, type, IrConstKind.Long, value) IrConstImpl(startOffset, endOffset, type, IrConstKind.Long, value)
fun float(startOffset: Int, endOffset: Int, type: IrType, value: Float): IrExpression = fun float(startOffset: Int, endOffset: Int, type: IrType, value: Float): IrConstImpl<Float> =
IrConstImpl(startOffset, endOffset, type, IrConstKind.Float, value) IrConstImpl(startOffset, endOffset, type, IrConstKind.Float, value)
fun double(startOffset: Int, endOffset: Int, type: IrType, value: Double): IrExpression = fun double(startOffset: Int, endOffset: Int, type: IrType, value: Double): IrConstImpl<Double> =
IrConstImpl(startOffset, endOffset, type, IrConstKind.Double, value) IrConstImpl(startOffset, endOffset, type, IrConstKind.Double, value)
fun char(startOffset: Int, endOffset: Int, type: IrType, value: Char): IrExpression = fun char(startOffset: Int, endOffset: Int, type: IrType, value: Char): IrConstImpl<Char> =
IrConstImpl(startOffset, endOffset, type, IrConstKind.Char, value) IrConstImpl(startOffset, endOffset, type, IrConstKind.Char, value)
fun byte(startOffset: Int, endOffset: Int, type: IrType, value: Byte): IrExpression = fun byte(startOffset: Int, endOffset: Int, type: IrType, value: Byte): IrConstImpl<Byte> =
IrConstImpl(startOffset, endOffset, type, IrConstKind.Byte, value) IrConstImpl(startOffset, endOffset, type, IrConstKind.Byte, value)
fun short(startOffset: Int, endOffset: Int, type: IrType, value: Short): IrExpression = fun short(startOffset: Int, endOffset: Int, type: IrType, value: Short): IrConstImpl<Short> =
IrConstImpl(startOffset, endOffset, type, IrConstKind.Short, value) IrConstImpl(startOffset, endOffset, type, IrConstKind.Short, value)
fun defaultValueForType(startOffset: Int, endOffset: Int, type: IrType) = when { fun defaultValueForType(startOffset: Int, endOffset: Int, type: IrType) = when {