FIR: Support FirComparisonOperator in Fir2Ir

^KT-31163 Fixed
This commit is contained in:
Denis Zharkov
2020-02-27 12:37:49 +03:00
parent 434444cd69
commit 8fca343ef0
26 changed files with 292 additions and 84 deletions
@@ -12,7 +12,9 @@ import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter
import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter
import org.jetbrains.kotlin.fir.descriptors.FirModuleDescriptor import org.jetbrains.kotlin.fir.descriptors.FirModuleDescriptor
import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.*
import org.jetbrains.kotlin.fir.expressions.impl.* import org.jetbrains.kotlin.fir.expressions.impl.FirElseIfTrueCondition
import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression
import org.jetbrains.kotlin.fir.expressions.impl.FirUnitExpression
import org.jetbrains.kotlin.fir.references.FirReference import org.jetbrains.kotlin.fir.references.FirReference
import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference
import org.jetbrains.kotlin.fir.references.FirSuperReference import org.jetbrains.kotlin.fir.references.FirSuperReference
@@ -24,6 +26,7 @@ import org.jetbrains.kotlin.fir.resolve.transformers.IntegerLiteralTypeApproxima
import org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope import org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope
import org.jetbrains.kotlin.fir.scopes.impl.FirIntegerOperator import org.jetbrains.kotlin.fir.scopes.impl.FirIntegerOperator
import org.jetbrains.kotlin.fir.symbols.AccessorSymbol import org.jetbrains.kotlin.fir.symbols.AccessorSymbol
import org.jetbrains.kotlin.fir.symbols.StandardClassIds
import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.symbols.impl.*
import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.*
import org.jetbrains.kotlin.fir.visitors.FirDefaultVisitor import org.jetbrains.kotlin.fir.visitors.FirDefaultVisitor
@@ -44,12 +47,9 @@ import org.jetbrains.kotlin.ir.symbols.*
import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.types.*
import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.ir.util.*
import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.*
import org.jetbrains.kotlin.psi2ir.PsiSourceManager import org.jetbrains.kotlin.psi2ir.PsiSourceManager
import org.jetbrains.kotlin.types.AbstractStrictEqualityTypeChecker
import java.util.* import java.util.*
class Fir2IrVisitor( class Fir2IrVisitor(
@@ -864,7 +864,7 @@ class Fir2IrVisitor(
} }
} }
override fun visitFunctionCall(functionCall: FirFunctionCall, data: Any?): IrElement { override fun visitFunctionCall(functionCall: FirFunctionCall, data: Any?): IrExpression {
val convertibleCall = if (functionCall.toResolvedCallableSymbol()?.fir is FirIntegerOperator) { val convertibleCall = if (functionCall.toResolvedCallableSymbol()?.fir is FirIntegerOperator) {
functionCall.copy().transformSingle(integerApproximator, null) functionCall.copy().transformSingle(integerApproximator, null)
} else { } else {
@@ -1312,50 +1312,72 @@ class Fir2IrVisitor(
} }
} }
private fun generateComparisonCall( override fun visitComparisonExpression(comparisonExpression: FirComparisonExpression, data: Any?): IrElement {
startOffset: Int, endOffset: Int, operation: FirOperation, first: FirExpression, second: FirExpression return comparisonExpression.convertWithOffsets { startOffset, endOffset ->
): IrExpression { generateComparisonCall(startOffset, endOffset, comparisonExpression)
val firstType = first.typeRef as? FirResolvedTypeRef
val secondType = second.typeRef as? FirResolvedTypeRef
if (firstType == null || secondType == null) {
return IrErrorCallExpressionImpl(startOffset, endOffset, booleanType, "Comparison of arguments with unresolved types")
} }
if (!AbstractStrictEqualityTypeChecker.strictEqualTypes(typeContext, firstType.type, secondType.type)) { }
return IrErrorCallExpressionImpl(
startOffset, endOffset, booleanType, private fun generateComparisonCall(
"Comparison of arguments with different types: ${firstType.type.render()}, ${secondType.type.render()}" startOffset: Int, endOffset: Int,
comparisonExpression: FirComparisonExpression
): IrExpression {
val operation = comparisonExpression.operation
fun fallbackToRealCall(): IrExpression {
val (symbol, origin) = getSymbolAndOriginForComparison(operation, irBuiltIns.intType.classifierOrFail)
return primitiveOp2(
startOffset, endOffset,
symbol!!,
booleanType,
origin,
visitFunctionCall(comparisonExpression.compareToCall, null),
IrConstImpl.int(startOffset, endOffset, irBuiltIns.intType, 0)
) )
} }
// TODO: it's temporary hack which should be refactored
val simpleType = when (val classId = (firstType.type as? ConeClassLikeType)?.lookupTag?.classId) { val comparisonInfo = comparisonExpression.inferPrimitiveNumericComparisonInfo() ?: return fallbackToRealCall()
ClassId(FqName("kotlin"), FqName("Long"), false) -> irBuiltIns.longType val comparisonType = comparisonInfo.comparisonType
ClassId(FqName("kotlin"), FqName("Int"), false) -> irBuiltIns.intType
ClassId(FqName("kotlin"), FqName("Float"), false) -> irBuiltIns.floatType // Currently inferPrimitiveNumericComparisonInfo returns null for different primitive values
ClassId(FqName("kotlin"), FqName("Double"), false) -> irBuiltIns.doubleType // TODO: Support different primitive types as well and fix inferPrimitiveNumericComparisonInfo
ClassId(FqName("kotlin"), FqName("Char"), false) -> irBuiltIns.charType require(comparisonInfo.leftPrimitiveType == comparisonInfo.rightPrimitiveType && comparisonInfo.leftType == comparisonInfo.rightType) {
else -> { "Contract for inferPrimitiveNumericComparisonInfo is violated"
return IrErrorCallExpressionImpl(
startOffset, endOffset, booleanType, "Comparison of arguments with unsupported type: $classId"
)
}
} }
val classifier = simpleType.classifierOrFail
val (symbol, origin) = when (operation) { val simpleType = when ((comparisonType.type as? ConeClassLikeType)?.lookupTag?.classId) {
StandardClassIds.Long -> irBuiltIns.longType
StandardClassIds.Int -> irBuiltIns.intType
StandardClassIds.Float -> irBuiltIns.floatType
StandardClassIds.Double -> irBuiltIns.doubleType
StandardClassIds.Char -> irBuiltIns.charType
else -> return fallbackToRealCall()
}
val (symbol, origin) = getSymbolAndOriginForComparison(operation, simpleType.classifierOrFail)
return primitiveOp2(
startOffset, endOffset, symbol!!, booleanType, origin,
comparisonExpression.left.toIrExpression(), comparisonExpression.right.toIrExpression()
)
}
private fun getSymbolAndOriginForComparison(
operation: FirOperation,
classifier: IrClassifierSymbol
): Pair<IrSimpleFunctionSymbol?, IrStatementOriginImpl> {
return when (operation) {
FirOperation.LT -> irBuiltIns.lessFunByOperandType[classifier] to IrStatementOrigin.LT FirOperation.LT -> irBuiltIns.lessFunByOperandType[classifier] to IrStatementOrigin.LT
FirOperation.GT -> irBuiltIns.greaterFunByOperandType[classifier] to IrStatementOrigin.GT FirOperation.GT -> irBuiltIns.greaterFunByOperandType[classifier] to IrStatementOrigin.GT
FirOperation.LT_EQ -> irBuiltIns.lessOrEqualFunByOperandType[classifier] to IrStatementOrigin.LTEQ FirOperation.LT_EQ -> irBuiltIns.lessOrEqualFunByOperandType[classifier] to IrStatementOrigin.LTEQ
FirOperation.GT_EQ -> irBuiltIns.greaterOrEqualFunByOperandType[classifier] to IrStatementOrigin.GTEQ FirOperation.GT_EQ -> irBuiltIns.greaterOrEqualFunByOperandType[classifier] to IrStatementOrigin.GTEQ
else -> throw AssertionError("Unexpected comparison operation: $operation") else -> error("Unexpected comparison operation: $operation")
} }
return primitiveOp2(startOffset, endOffset, symbol!!, booleanType, origin, first.toIrExpression(), second.toIrExpression())
} }
private fun generateOperatorCall( private fun generateOperatorCall(
startOffset: Int, endOffset: Int, operation: FirOperation, arguments: List<FirExpression> startOffset: Int, endOffset: Int, operation: FirOperation, arguments: List<FirExpression>
): IrExpression { ): IrExpression {
if (operation in FirOperation.COMPARISONS) {
return generateComparisonCall(startOffset, endOffset, operation, arguments[0], arguments[1])
}
val (type, symbol, origin) = when (operation) { val (type, symbol, origin) = when (operation) {
FirOperation.EQ -> Triple(booleanType, irBuiltIns.eqeqSymbol, IrStatementOrigin.EQEQ) FirOperation.EQ -> Triple(booleanType, irBuiltIns.eqeqSymbol, IrStatementOrigin.EQEQ)
FirOperation.NOT_EQ -> Triple(booleanType, irBuiltIns.eqeqSymbol, IrStatementOrigin.EXCLEQ) FirOperation.NOT_EQ -> Triple(booleanType, irBuiltIns.eqeqSymbol, IrStatementOrigin.EXCLEQ)
@@ -0,0 +1,58 @@
/*
* Copyright 2010-2020 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.fir.backend
import org.jetbrains.kotlin.fir.*
import org.jetbrains.kotlin.fir.expressions.FirComparisonExpression
import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.resolve.firSymbolProvider
import org.jetbrains.kotlin.fir.types.*
import org.jetbrains.kotlin.utils.addToStdlib.firstNotNullResult
class PrimitiveConeNumericComparisonInfo(
val comparisonType: ConeKotlinType,
val leftPrimitiveType: ConeClassLikeType,
val rightPrimitiveType: ConeClassLikeType,
val leftType: ConeKotlinType,
val rightType: ConeKotlinType
)
val FirComparisonExpression.left: FirExpression
get() = compareToCall.explicitReceiver ?: error("There should be an explicit receiver for ${compareToCall.render()}")
val FirComparisonExpression.right: FirExpression
get() = compareToCall.arguments.getOrNull(0) ?: error("There should be a first arg for ${compareToCall.render()}")
fun FirComparisonExpression.inferPrimitiveNumericComparisonInfo(): PrimitiveConeNumericComparisonInfo? {
val leftType = left.typeRef.coneTypeSafe<ConeKotlinType>() ?: return null
val rightType = right.typeRef.coneTypeSafe<ConeKotlinType>() ?: return null
val leftPrimitiveOrNullableType = leftType.getPrimitiveTypeOrSupertype() ?: return null
val rightPrimitiveOrNullableType = rightType.getPrimitiveTypeOrSupertype() ?: return null
val leftPrimitiveType = leftPrimitiveOrNullableType.withNullability(ConeNullability.NOT_NULL)
val rightPrimitiveType = rightPrimitiveOrNullableType.withNullability(ConeNullability.NOT_NULL)
// TODO: Support different types with coercion
if (leftPrimitiveType != rightPrimitiveType) return null
val leastCommonType = rightPrimitiveType
return PrimitiveConeNumericComparisonInfo(
leastCommonType,
leftPrimitiveType, rightPrimitiveType,
leftPrimitiveOrNullableType, rightPrimitiveOrNullableType
)
}
private fun ConeKotlinType.getPrimitiveTypeOrSupertype(): ConeClassLikeType? =
when {
this is ConeTypeParameterType ->
this.lookupTag.typeParameterSymbol.fir.bounds.firstNotNullResult {
it.coneTypeSafe<ConeKotlinType>()?.getPrimitiveTypeOrSupertype()
}
this is ConeClassLikeType && isPrimitiveNumberType() ->
this
else ->
null
}
@@ -0,0 +1,40 @@
/*
* Copyright 2010-2020 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.fir
import org.jetbrains.kotlin.fir.symbols.StandardClassIds
import org.jetbrains.kotlin.fir.symbols.impl.ConeClassLikeLookupTagImpl
import org.jetbrains.kotlin.fir.types.ConeClassLikeType
import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl
import org.jetbrains.kotlin.name.ClassId
object PrimitiveTypes {
val Boolean = StandardClassIds.Boolean.createType()
val Char = StandardClassIds.Char.createType()
val Byte = StandardClassIds.Byte.createType()
val Short = StandardClassIds.Short.createType()
val Int = StandardClassIds.Int.createType()
val Long = StandardClassIds.Long.createType()
val Float = StandardClassIds.Float.createType()
val Double = StandardClassIds.Double.createType()
}
private fun ClassId.createType(): ConeClassLikeType =
ConeClassLikeTypeImpl(ConeClassLikeLookupTagImpl(this), emptyArray(), isNullable = false)
fun ConeClassLikeType.isDouble() = lookupTag.classId == StandardClassIds.Double
fun ConeClassLikeType.isFloat() = lookupTag.classId == StandardClassIds.Float
fun ConeClassLikeType.isLong() = lookupTag.classId == StandardClassIds.Long
fun ConeClassLikeType.isInt() = lookupTag.classId == StandardClassIds.Int
fun ConeClassLikeType.isShort() = lookupTag.classId == StandardClassIds.Short
fun ConeClassLikeType.isByte() = lookupTag.classId == StandardClassIds.Byte
private val PRIMITIVE_NUMBER_CLASS_IDS = setOf(
StandardClassIds.Double, StandardClassIds.Float, StandardClassIds.Long, StandardClassIds.Int,
StandardClassIds.Short, StandardClassIds.Byte
)
fun ConeClassLikeType.isPrimitiveNumberType() = lookupTag.classId in PRIMITIVE_NUMBER_CLASS_IDS
+1 -2
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
operator fun Int.compareTo(c: Char) = 0 operator fun Int.compareTo(c: Char) = 0
fun foo(x: Int, y: Char): String { fun foo(x: Int, y: Char): String {
@@ -10,4 +9,4 @@ fun foo(x: Int, y: Char): String {
fun box(): String { fun box(): String {
return foo(42, 'O') return foo(42, 'O')
} }
@@ -1,5 +1,4 @@
// !LANGUAGE: +ProperIeee754Comparisons // !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND_FIR: JVM_IR
operator fun Int.compareTo(c: Char) = 0 operator fun Int.compareTo(c: Char) = 0
fun foo(x: Int, y: Char): String { fun foo(x: Int, y: Char): String {
@@ -11,4 +10,4 @@ fun foo(x: Int, y: Char): String {
fun box(): String { fun box(): String {
return foo(42, 'O') return foo(42, 'O')
} }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
inline fun ltx(a: Comparable<Any>, b: Any) = a < b inline fun ltx(a: Comparable<Any>, b: Any) = a < b
inline fun lex(a: Comparable<Any>, b: Any) = a <= b inline fun lex(a: Comparable<Any>, b: Any) = a <= b
inline fun gex(a: Comparable<Any>, b: Any) = a >= b inline fun gex(a: Comparable<Any>, b: Any) = a >= b
@@ -44,4 +43,4 @@ fun box(): String {
else -> "OK" else -> "OK"
} }
} }
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
inline fun ltx(a: Comparable<Any>, b: Any) = a < b inline fun ltx(a: Comparable<Any>, b: Any) = a < b
inline fun lex(a: Comparable<Any>, b: Any) = a <= b inline fun lex(a: Comparable<Any>, b: Any) = a <= b
inline fun gex(a: Comparable<Any>, b: Any) = a >= b inline fun gex(a: Comparable<Any>, b: Any) = a >= b
@@ -79,4 +77,4 @@ fun box(): String {
else -> "OK" else -> "OK"
} }
} }
+1 -2
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class KeySpan(val left: String) { class KeySpan(val left: String) {
public fun matches(value : String) : Boolean { public fun matches(value : String) : Boolean {
@@ -11,4 +10,4 @@ class KeySpan(val left: String) {
fun box() : String { fun box() : String {
KeySpan("1").matches("3") KeySpan("1").matches("3")
return "OK" return "OK"
} }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class C class C
operator fun C.compareTo(o: C) : Int { operator fun C.compareTo(o: C) : Int {
@@ -9,4 +8,4 @@ operator fun C.compareTo(o: C) : Int {
return -1 return -1
} }
fun box() : String = if (C() > C()) "OK" else "FAIL" fun box() : String = if (C() > C()) "OK" else "FAIL"
@@ -1,5 +1,4 @@
// !LANGUAGE: -ProperIeee754Comparisons // !LANGUAGE: -ProperIeee754Comparisons
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: NATIVE // IGNORE_BACKEND: NATIVE
// DONT_TARGET_EXACT_BACKEND: JS_IR // DONT_TARGET_EXACT_BACKEND: JS_IR
fun box(): String { fun box(): String {
@@ -14,4 +13,4 @@ fun box(): String {
} }
return "fail" return "fail"
} }
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Boolean, y: Boolean) = when { fun checkLess(x: Boolean, y: Boolean) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Double, y: Int) = when { fun checkLess(x: Double, y: Int) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Double, y: Long) = when { fun checkLess(x: Double, y: Long) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Array<Int>, y: Array<Int>) = when { fun checkLess(x: Array<Int>, y: Array<Int>) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
class A(val x: Int) class A(val x: Int)
operator fun A.compareTo(other: A) = x.compareTo(other.x) operator fun A.compareTo(other: A) = x.compareTo(other.x)
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Int, y: Double) = when { fun checkLess(x: Int, y: Double) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Int, y: Long) = when { fun checkLess(x: Int, y: Long) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Long, y: Double) = when { fun checkLess(x: Long, y: Double) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun checkLess(x: Long, y: Int) = when { fun checkLess(x: Long, y: Int) = when {
x >= y -> "Fail $x >= $y" x >= y -> "Fail $x >= $y"
!(x < y) -> "Fail !($x < $y)" !(x < y) -> "Fail !($x < $y)"
@@ -1,5 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String { fun box(): String {
if (1 >= 1.9) return "Fail #1" if (1 >= 1.9) return "Fail #1"
if (1.compareTo(1.1) >= 0) return "Fail #2" if (1.compareTo(1.1) >= 0) return "Fail #2"
@@ -39,25 +39,45 @@ FILE fqName:<root> fileName:/conventionComparisons.kt
VALUE_PARAMETER name:a2 index:1 type:<root>.IA VALUE_PARAMETER name:a2 index:1 type:<root>.IA
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test1 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: /IA' type=kotlin.Boolean CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
arg0: CALL 'public abstract fun compareTo (other: <root>.IA): kotlin.Int [operator] declared in <root>.IB' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IB declared in <root>.test1' type=<root>.IB origin=null
$receiver: GET_VAR 'a1: <root>.IA declared in <root>.test1' type=<root>.IA origin=null
other: GET_VAR 'a2: <root>.IA declared in <root>.test1' type=<root>.IA origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:test2 visibility:public modality:FINAL <> ($receiver:<root>.IB, a1:<root>.IA, a2:<root>.IA) returnType:kotlin.Boolean FUN name:test2 visibility:public modality:FINAL <> ($receiver:<root>.IB, a1:<root>.IA, a2:<root>.IA) returnType:kotlin.Boolean
$receiver: VALUE_PARAMETER name:<this> type:<root>.IB $receiver: VALUE_PARAMETER name:<this> type:<root>.IB
VALUE_PARAMETER name:a1 index:0 type:<root>.IA VALUE_PARAMETER name:a1 index:0 type:<root>.IA
VALUE_PARAMETER name:a2 index:1 type:<root>.IA VALUE_PARAMETER name:a2 index:1 type:<root>.IA
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test2 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: /IA' type=kotlin.Boolean CALL 'public final fun greaterOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GTEQ
arg0: CALL 'public abstract fun compareTo (other: <root>.IA): kotlin.Int [operator] declared in <root>.IB' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IB declared in <root>.test2' type=<root>.IB origin=null
$receiver: GET_VAR 'a1: <root>.IA declared in <root>.test2' type=<root>.IA origin=null
other: GET_VAR 'a2: <root>.IA declared in <root>.test2' type=<root>.IA origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:test3 visibility:public modality:FINAL <> ($receiver:<root>.IB, a1:<root>.IA, a2:<root>.IA) returnType:kotlin.Boolean FUN name:test3 visibility:public modality:FINAL <> ($receiver:<root>.IB, a1:<root>.IA, a2:<root>.IA) returnType:kotlin.Boolean
$receiver: VALUE_PARAMETER name:<this> type:<root>.IB $receiver: VALUE_PARAMETER name:<this> type:<root>.IB
VALUE_PARAMETER name:a1 index:0 type:<root>.IA VALUE_PARAMETER name:a1 index:0 type:<root>.IA
VALUE_PARAMETER name:a2 index:1 type:<root>.IA VALUE_PARAMETER name:a2 index:1 type:<root>.IA
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test3 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: /IA' type=kotlin.Boolean CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public abstract fun compareTo (other: <root>.IA): kotlin.Int [operator] declared in <root>.IB' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IB declared in <root>.test3' type=<root>.IB origin=null
$receiver: GET_VAR 'a1: <root>.IA declared in <root>.test3' type=<root>.IA origin=null
other: GET_VAR 'a2: <root>.IA declared in <root>.test3' type=<root>.IA origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:test4 visibility:public modality:FINAL <> ($receiver:<root>.IB, a1:<root>.IA, a2:<root>.IA) returnType:kotlin.Boolean FUN name:test4 visibility:public modality:FINAL <> ($receiver:<root>.IB, a1:<root>.IA, a2:<root>.IA) returnType:kotlin.Boolean
$receiver: VALUE_PARAMETER name:<this> type:<root>.IB $receiver: VALUE_PARAMETER name:<this> type:<root>.IB
VALUE_PARAMETER name:a1 index:0 type:<root>.IA VALUE_PARAMETER name:a1 index:0 type:<root>.IA
VALUE_PARAMETER name:a2 index:1 type:<root>.IA VALUE_PARAMETER name:a2 index:1 type:<root>.IA
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test4 (a1: <root>.IA, a2: <root>.IA): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: /IA' type=kotlin.Boolean CALL 'public final fun lessOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LTEQ
arg0: CALL 'public abstract fun compareTo (other: <root>.IA): kotlin.Int [operator] declared in <root>.IB' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.IB declared in <root>.test4' type=<root>.IB origin=null
$receiver: GET_VAR 'a1: <root>.IA declared in <root>.test4' type=<root>.IA origin=null
other: GET_VAR 'a2: <root>.IA declared in <root>.test4' type=<root>.IA origin=null
arg1: CONST Int type=kotlin.Int value=0
@@ -111,7 +111,13 @@ FILE fqName:<root> fileName:/floatingPointLess.kt
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Float, kotlin/Double' type=kotlin.Boolean then: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Float' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float
GET_VAR 'x: kotlin.Any declared in <root>.testFD' type=kotlin.Any origin=null
other: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double
GET_VAR 'y: kotlin.Any declared in <root>.testFD' type=kotlin.Any origin=null
arg1: CONST Int type=kotlin.Int value=0
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
@@ -131,7 +137,13 @@ FILE fqName:<root> fileName:/floatingPointLess.kt
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Double, kotlin/Float' type=kotlin.Boolean then: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo (other: kotlin.Float): kotlin.Int [operator] declared in kotlin.Double' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Double origin=IMPLICIT_CAST typeOperand=kotlin.Double
GET_VAR 'x: kotlin.Any declared in <root>.testDF' type=kotlin.Any origin=null
other: TYPE_OP type=kotlin.Float origin=IMPLICIT_CAST typeOperand=kotlin.Float
GET_VAR 'y: kotlin.Any declared in <root>.testDF' type=kotlin.Any origin=null
arg1: CONST Int type=kotlin.Int value=0
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
@@ -8,7 +8,12 @@ FILE fqName:<root> fileName:/nullableAnyAsIntToDouble.kt
BRANCH BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int
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: ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Double' type=kotlin.Boolean then: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo (other: kotlin.Double): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
GET_VAR 'x: kotlin.Any? declared in <root>.test' type=kotlin.Any? origin=null
other: GET_VAR 'y: kotlin.Double declared in <root>.test' type=kotlin.Double origin=null
arg1: CONST Int type=kotlin.Int value=0
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
+26 -4
View File
@@ -10,7 +10,11 @@ FILE fqName:<root> fileName:/kt23030.kt
VALUE_PARAMETER name:y index:1 type:kotlin.Char VALUE_PARAMETER name:y index:1 type:kotlin.Char
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testOverloadedCompareToCall (x: kotlin.Int, y: kotlin.Char): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun testOverloadedCompareToCall (x: kotlin.Int, y: kotlin.Char): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Char' type=kotlin.Boolean CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo (c: kotlin.Char): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
$receiver: GET_VAR 'x: kotlin.Int declared in <root>.testOverloadedCompareToCall' type=kotlin.Int origin=null
c: GET_VAR 'y: kotlin.Char declared in <root>.testOverloadedCompareToCall' type=kotlin.Char origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:testOverloadedCompareToCallWithSmartCast visibility:public modality:FINAL <> (x:kotlin.Any, y:kotlin.Any) returnType:kotlin.Boolean FUN name:testOverloadedCompareToCallWithSmartCast visibility:public modality:FINAL <> (x:kotlin.Any, y:kotlin.Any) returnType:kotlin.Boolean
VALUE_PARAMETER name:x index:0 type:kotlin.Any VALUE_PARAMETER name:x index:0 type:kotlin.Any
VALUE_PARAMETER name:y index:1 type:kotlin.Any VALUE_PARAMETER name:y index:1 type:kotlin.Any
@@ -27,7 +31,13 @@ FILE fqName:<root> fileName:/kt23030.kt
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Char' type=kotlin.Boolean then: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo (c: kotlin.Char): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=null
$receiver: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
GET_VAR 'x: kotlin.Any declared in <root>.testOverloadedCompareToCallWithSmartCast' type=kotlin.Any origin=null
c: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char
GET_VAR 'y: kotlin.Any declared in <root>.testOverloadedCompareToCallWithSmartCast' type=kotlin.Any origin=null
arg1: CONST Int type=kotlin.Int value=0
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
@@ -74,7 +84,12 @@ FILE fqName:<root> fileName:/kt23030.kt
VALUE_PARAMETER name:y index:1 type:kotlin.Char VALUE_PARAMETER name:y index:1 type:kotlin.Char
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testMemberExtensionCompareToCall (x: kotlin.Int, y: kotlin.Char): kotlin.Boolean declared in <root>.C' RETURN type=kotlin.Nothing from='public final fun testMemberExtensionCompareToCall (x: kotlin.Int, y: kotlin.Char): kotlin.Boolean declared in <root>.C'
ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Char' type=kotlin.Boolean CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo (c: kotlin.Char): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.C declared in <root>.C.testMemberExtensionCompareToCall' type=<root>.C origin=null
$receiver: GET_VAR 'x: kotlin.Int declared in <root>.C.testMemberExtensionCompareToCall' type=kotlin.Int origin=null
c: GET_VAR 'y: kotlin.Char declared in <root>.C.testMemberExtensionCompareToCall' type=kotlin.Char origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:testMemberExtensionCompareToCallWithSmartCast visibility:public modality:FINAL <> ($this:<root>.C, x:kotlin.Any, y:kotlin.Any) returnType:kotlin.Boolean FUN name:testMemberExtensionCompareToCallWithSmartCast visibility:public modality:FINAL <> ($this:<root>.C, x:kotlin.Any, y:kotlin.Any) returnType:kotlin.Boolean
$this: VALUE_PARAMETER name:<this> type:<root>.C $this: VALUE_PARAMETER name:<this> type:<root>.C
VALUE_PARAMETER name:x index:0 type:kotlin.Any VALUE_PARAMETER name:x index:0 type:kotlin.Any
@@ -92,7 +107,14 @@ FILE fqName:<root> fileName:/kt23030.kt
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
then: ERROR_CALL 'Comparison of arguments with different types: kotlin/Int, kotlin/Char' type=kotlin.Boolean then: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public final fun compareTo (c: kotlin.Char): kotlin.Int [operator] declared in <root>.C' type=kotlin.Int origin=null
$this: GET_VAR '<this>: <root>.C declared in <root>.C.testMemberExtensionCompareToCallWithSmartCast' type=<root>.C origin=null
$receiver: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
GET_VAR 'x: kotlin.Any declared in <root>.C.testMemberExtensionCompareToCallWithSmartCast' type=kotlin.Any origin=null
c: TYPE_OP type=kotlin.Char origin=IMPLICIT_CAST typeOperand=kotlin.Char
GET_VAR 'y: kotlin.Any declared in <root>.C.testMemberExtensionCompareToCallWithSmartCast' type=kotlin.Any origin=null
arg1: CONST Int type=kotlin.Int value=0
BRANCH BRANCH
if: CONST Boolean type=kotlin.Boolean value=true if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Boolean type=kotlin.Boolean value=false then: CONST Boolean type=kotlin.Boolean value=false
@@ -4,49 +4,81 @@ FILE fqName:<root> fileName:/primitiveComparisons.kt
VALUE_PARAMETER name:b index:1 type:kotlin.Byte VALUE_PARAMETER name:b index:1 type:kotlin.Byte
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun btest1 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun btest1 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Byte' type=kotlin.Boolean CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
arg0: CALL 'public open fun compareTo (other: kotlin.Byte): kotlin.Int [operator] declared in kotlin.Byte' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Byte declared in <root>.btest1' type=kotlin.Byte origin=null
other: GET_VAR 'b: kotlin.Byte declared in <root>.btest1' type=kotlin.Byte origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:btest2 visibility:public modality:FINAL <> (a:kotlin.Byte, b:kotlin.Byte) returnType:kotlin.Boolean FUN name:btest2 visibility:public modality:FINAL <> (a:kotlin.Byte, b:kotlin.Byte) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Byte VALUE_PARAMETER name:a index:0 type:kotlin.Byte
VALUE_PARAMETER name:b index:1 type:kotlin.Byte VALUE_PARAMETER name:b index:1 type:kotlin.Byte
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun btest2 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun btest2 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Byte' type=kotlin.Boolean CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public open fun compareTo (other: kotlin.Byte): kotlin.Int [operator] declared in kotlin.Byte' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Byte declared in <root>.btest2' type=kotlin.Byte origin=null
other: GET_VAR 'b: kotlin.Byte declared in <root>.btest2' type=kotlin.Byte origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:btest3 visibility:public modality:FINAL <> (a:kotlin.Byte, b:kotlin.Byte) returnType:kotlin.Boolean FUN name:btest3 visibility:public modality:FINAL <> (a:kotlin.Byte, b:kotlin.Byte) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Byte VALUE_PARAMETER name:a index:0 type:kotlin.Byte
VALUE_PARAMETER name:b index:1 type:kotlin.Byte VALUE_PARAMETER name:b index:1 type:kotlin.Byte
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun btest3 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun btest3 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Byte' type=kotlin.Boolean CALL 'public final fun greaterOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GTEQ
arg0: CALL 'public open fun compareTo (other: kotlin.Byte): kotlin.Int [operator] declared in kotlin.Byte' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Byte declared in <root>.btest3' type=kotlin.Byte origin=null
other: GET_VAR 'b: kotlin.Byte declared in <root>.btest3' type=kotlin.Byte origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:btest4 visibility:public modality:FINAL <> (a:kotlin.Byte, b:kotlin.Byte) returnType:kotlin.Boolean FUN name:btest4 visibility:public modality:FINAL <> (a:kotlin.Byte, b:kotlin.Byte) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Byte VALUE_PARAMETER name:a index:0 type:kotlin.Byte
VALUE_PARAMETER name:b index:1 type:kotlin.Byte VALUE_PARAMETER name:b index:1 type:kotlin.Byte
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun btest4 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun btest4 (a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Byte' type=kotlin.Boolean CALL 'public final fun lessOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LTEQ
arg0: CALL 'public open fun compareTo (other: kotlin.Byte): kotlin.Int [operator] declared in kotlin.Byte' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Byte declared in <root>.btest4' type=kotlin.Byte origin=null
other: GET_VAR 'b: kotlin.Byte declared in <root>.btest4' type=kotlin.Byte origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:stest1 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean FUN name:stest1 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Short VALUE_PARAMETER name:a index:0 type:kotlin.Short
VALUE_PARAMETER name:b index:1 type:kotlin.Short VALUE_PARAMETER name:b index:1 type:kotlin.Short
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun stest1 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun stest1 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Short' type=kotlin.Boolean CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
arg0: CALL 'public open fun compareTo (other: kotlin.Short): kotlin.Int [operator] declared in kotlin.Short' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Short declared in <root>.stest1' type=kotlin.Short origin=null
other: GET_VAR 'b: kotlin.Short declared in <root>.stest1' type=kotlin.Short origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:stest2 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean FUN name:stest2 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Short VALUE_PARAMETER name:a index:0 type:kotlin.Short
VALUE_PARAMETER name:b index:1 type:kotlin.Short VALUE_PARAMETER name:b index:1 type:kotlin.Short
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun stest2 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun stest2 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Short' type=kotlin.Boolean CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public open fun compareTo (other: kotlin.Short): kotlin.Int [operator] declared in kotlin.Short' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Short declared in <root>.stest2' type=kotlin.Short origin=null
other: GET_VAR 'b: kotlin.Short declared in <root>.stest2' type=kotlin.Short origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:stest3 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean FUN name:stest3 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Short VALUE_PARAMETER name:a index:0 type:kotlin.Short
VALUE_PARAMETER name:b index:1 type:kotlin.Short VALUE_PARAMETER name:b index:1 type:kotlin.Short
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun stest3 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun stest3 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Short' type=kotlin.Boolean CALL 'public final fun greaterOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GTEQ
arg0: CALL 'public open fun compareTo (other: kotlin.Short): kotlin.Int [operator] declared in kotlin.Short' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Short declared in <root>.stest3' type=kotlin.Short origin=null
other: GET_VAR 'b: kotlin.Short declared in <root>.stest3' type=kotlin.Short origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:stest4 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean FUN name:stest4 visibility:public modality:FINAL <> (a:kotlin.Short, b:kotlin.Short) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Short VALUE_PARAMETER name:a index:0 type:kotlin.Short
VALUE_PARAMETER name:b index:1 type:kotlin.Short VALUE_PARAMETER name:b index:1 type:kotlin.Short
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun stest4 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun stest4 (a: kotlin.Short, b: kotlin.Short): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/Short' type=kotlin.Boolean CALL 'public final fun lessOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LTEQ
arg0: CALL 'public open fun compareTo (other: kotlin.Short): kotlin.Int [operator] declared in kotlin.Short' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.Short declared in <root>.stest4' type=kotlin.Short origin=null
other: GET_VAR 'b: kotlin.Short declared in <root>.stest4' type=kotlin.Short origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:itest1 visibility:public modality:FINAL <> (a:kotlin.Int, b:kotlin.Int) returnType:kotlin.Boolean FUN name:itest1 visibility:public modality:FINAL <> (a:kotlin.Int, b:kotlin.Int) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.Int VALUE_PARAMETER name:a index:0 type:kotlin.Int
VALUE_PARAMETER name:b index:1 type:kotlin.Int VALUE_PARAMETER name:b index:1 type:kotlin.Int
@@ -4,22 +4,38 @@ FILE fqName:<root> fileName:/stringComparisons.kt
VALUE_PARAMETER name:b index:1 type:kotlin.String VALUE_PARAMETER name:b index:1 type:kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/String' type=kotlin.Boolean CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
arg0: CALL 'public open fun compareTo (other: kotlin.String): kotlin.Int [operator] declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.String declared in <root>.test1' type=kotlin.String origin=null
other: GET_VAR 'b: kotlin.String declared in <root>.test1' type=kotlin.String origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.String, b:kotlin.String) returnType:kotlin.Boolean FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.String, b:kotlin.String) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.String VALUE_PARAMETER name:a index:0 type:kotlin.String
VALUE_PARAMETER name:b index:1 type:kotlin.String VALUE_PARAMETER name:b index:1 type:kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/String' type=kotlin.Boolean CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: CALL 'public open fun compareTo (other: kotlin.String): kotlin.Int [operator] declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.String declared in <root>.test2' type=kotlin.String origin=null
other: GET_VAR 'b: kotlin.String declared in <root>.test2' type=kotlin.String origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.String, b:kotlin.String) returnType:kotlin.Boolean FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.String, b:kotlin.String) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.String VALUE_PARAMETER name:a index:0 type:kotlin.String
VALUE_PARAMETER name:b index:1 type:kotlin.String VALUE_PARAMETER name:b index:1 type:kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/String' type=kotlin.Boolean CALL 'public final fun greaterOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GTEQ
arg0: CALL 'public open fun compareTo (other: kotlin.String): kotlin.Int [operator] declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.String declared in <root>.test3' type=kotlin.String origin=null
other: GET_VAR 'b: kotlin.String declared in <root>.test3' type=kotlin.String origin=null
arg1: CONST Int type=kotlin.Int value=0
FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.String, b:kotlin.String) returnType:kotlin.Boolean FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.String, b:kotlin.String) returnType:kotlin.Boolean
VALUE_PARAMETER name:a index:0 type:kotlin.String VALUE_PARAMETER name:a index:0 type:kotlin.String
VALUE_PARAMETER name:b index:1 type:kotlin.String VALUE_PARAMETER name:b index:1 type:kotlin.String
BLOCK_BODY BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test4 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>' RETURN type=kotlin.Nothing from='public final fun test4 (a: kotlin.String, b: kotlin.String): kotlin.Boolean declared in <root>'
ERROR_CALL 'Comparison of arguments with unsupported type: kotlin/String' type=kotlin.Boolean CALL 'public final fun lessOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LTEQ
arg0: CALL 'public open fun compareTo (other: kotlin.String): kotlin.Int [operator] declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_VAR 'a: kotlin.String declared in <root>.test4' type=kotlin.String origin=null
other: GET_VAR 'b: kotlin.String declared in <root>.test4' type=kotlin.String origin=null
arg1: CONST Int type=kotlin.Int value=0