Introduce limited constant conversions for Kotlin/Native

#KT-25320 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-07-16 15:59:21 +03:00
parent 1a51132884
commit acd5b62148
15 changed files with 735 additions and 37 deletions
@@ -0,0 +1,68 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: annotation.kt
package kotlin.internal
annotation class ImplicitIntegerCoercion
// FILE: test.kt
import kotlin.internal.ImplicitIntegerCoercion
@ImplicitIntegerCoercion
const val IMPLICIT_INT = 255
@ImplicitIntegerCoercion
const val EXPLICIT_INT: Int = 255
@ImplicitIntegerCoercion
const val LONG_CONST = 255L
@ImplicitIntegerCoercion
val NON_CONST = 255
@ImplicitIntegerCoercion
const val BIGGER_THAN_UBYTE = 256
@ImplicitIntegerCoercion
const val UINT_CONST = 42u
fun takeUByte(@ImplicitIntegerCoercion u: UByte) {}
fun takeUShort(@ImplicitIntegerCoercion u: UShort) {}
fun takeUInt(@ImplicitIntegerCoercion u: UInt) {}
fun takeULong(@ImplicitIntegerCoercion u: ULong) {}
fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) {}
fun takeLong(@ImplicitIntegerCoercion l: Long) {}
fun takeUIntWithoutAnnotaion(u: UInt) {}
fun takeIntWithoutAnnotation(i: Int) {}
fun test() {
takeUByte(IMPLICIT_INT)
takeUByte(EXPLICIT_INT)
takeUShort(IMPLICIT_INT)
takeUShort(BIGGER_THAN_UBYTE)
takeUInt(IMPLICIT_INT)
takeULong(IMPLICIT_INT)
takeUBytes(IMPLICIT_INT, EXPLICIT_INT, 42u)
takeLong(IMPLICIT_INT)
takeIntWithoutAnnotation(IMPLICIT_INT)
takeUIntWithoutAnnotaion(UINT_CONST)
takeUByte(<!TYPE_MISMATCH!>LONG_CONST<!>)
takeUByte(<!TYPE_MISMATCH!>NON_CONST<!>)
takeUByte(<!TYPE_MISMATCH!>BIGGER_THAN_UBYTE<!>)
takeUByte(<!TYPE_MISMATCH!>UINT_CONST<!>)
takeUIntWithoutAnnotaion(<!TYPE_MISMATCH!>IMPLICIT_INT<!>)
}
@@ -0,0 +1,303 @@
package
@kotlin.internal.ImplicitIntegerCoercion public const val BIGGER_THAN_UBYTE: kotlin.Int = 256
@kotlin.internal.ImplicitIntegerCoercion public const val EXPLICIT_INT: kotlin.Int = 255
@kotlin.internal.ImplicitIntegerCoercion public const val IMPLICIT_INT: kotlin.Int = 255
@kotlin.internal.ImplicitIntegerCoercion public const val LONG_CONST: kotlin.Long = 255.toLong()
@kotlin.internal.ImplicitIntegerCoercion public val NON_CONST: kotlin.Int = 255
@kotlin.internal.ImplicitIntegerCoercion public const val UINT_CONST: kotlin.UInt = 42.toUInt()
public fun takeIntWithoutAnnotation(/*0*/ i: kotlin.Int): kotlin.Unit
public fun takeLong(/*0*/ @kotlin.internal.ImplicitIntegerCoercion l: kotlin.Long): kotlin.Unit
public fun takeUByte(/*0*/ @kotlin.internal.ImplicitIntegerCoercion u: kotlin.UByte): kotlin.Unit
public fun takeUBytes(/*0*/ @kotlin.internal.ImplicitIntegerCoercion vararg u: kotlin.UByte /*kotlin.UByteArray*/): kotlin.Unit
public fun takeUInt(/*0*/ @kotlin.internal.ImplicitIntegerCoercion u: kotlin.UInt): kotlin.Unit
public fun takeUIntWithoutAnnotaion(/*0*/ u: kotlin.UInt): kotlin.Unit
public fun takeULong(/*0*/ @kotlin.internal.ImplicitIntegerCoercion u: kotlin.ULong): kotlin.Unit
public fun takeUShort(/*0*/ @kotlin.internal.ImplicitIntegerCoercion u: kotlin.UShort): kotlin.Unit
public fun test(): kotlin.Unit
package kotlin {
package kotlin.annotation {
}
package kotlin.collections {
}
package kotlin.comparisons {
}
package kotlin.concurrent {
}
package kotlin.coroutines {
package kotlin.coroutines.experimental {
package kotlin.coroutines.experimental.intrinsics {
}
package kotlin.coroutines.experimental.jvm {
package kotlin.coroutines.experimental.jvm.internal {
}
}
}
}
package kotlin.experimental {
}
package kotlin.internal {
public final annotation class ImplicitIntegerCoercion : kotlin.Annotation {
public constructor ImplicitIntegerCoercion()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
package kotlin.internal.contracts {
}
}
package kotlin.io {
}
package kotlin.jvm {
package kotlin.jvm.functions {
}
package kotlin.jvm.internal {
package kotlin.jvm.internal.markers {
}
package kotlin.jvm.internal.unsafe {
}
}
}
package kotlin.math {
}
package kotlin.properties {
}
package kotlin.ranges {
}
package kotlin.reflect {
package kotlin.reflect.full {
}
package kotlin.reflect.jvm {
package kotlin.reflect.jvm.internal {
package kotlin.reflect.jvm.internal.components {
}
package kotlin.reflect.jvm.internal.impl {
package kotlin.reflect.jvm.internal.impl.builtins {
package kotlin.reflect.jvm.internal.impl.builtins.functions {
}
package kotlin.reflect.jvm.internal.impl.builtins.jvm {
}
}
package kotlin.reflect.jvm.internal.impl.descriptors {
package kotlin.reflect.jvm.internal.impl.descriptors.annotations {
}
package kotlin.reflect.jvm.internal.impl.descriptors.deserialization {
}
package kotlin.reflect.jvm.internal.impl.descriptors.impl {
}
}
package kotlin.reflect.jvm.internal.impl.incremental {
package kotlin.reflect.jvm.internal.impl.incremental.components {
}
}
package kotlin.reflect.jvm.internal.impl.load {
package kotlin.reflect.jvm.internal.impl.load.java {
package kotlin.reflect.jvm.internal.impl.load.java.components {
}
package kotlin.reflect.jvm.internal.impl.load.java.descriptors {
}
package kotlin.reflect.jvm.internal.impl.load.java.lazy {
package kotlin.reflect.jvm.internal.impl.load.java.lazy.descriptors {
}
package kotlin.reflect.jvm.internal.impl.load.java.lazy.types {
}
}
package kotlin.reflect.jvm.internal.impl.load.java.sources {
}
package kotlin.reflect.jvm.internal.impl.load.java.structure {
}
package kotlin.reflect.jvm.internal.impl.load.java.typeEnhancement {
}
}
package kotlin.reflect.jvm.internal.impl.load.kotlin {
package kotlin.reflect.jvm.internal.impl.load.kotlin.header {
}
}
}
package kotlin.reflect.jvm.internal.impl.metadata {
package kotlin.reflect.jvm.internal.impl.metadata.builtins {
}
package kotlin.reflect.jvm.internal.impl.metadata.deserialization {
}
package kotlin.reflect.jvm.internal.impl.metadata.jvm {
package kotlin.reflect.jvm.internal.impl.metadata.jvm.deserialization {
}
}
}
package kotlin.reflect.jvm.internal.impl.name {
}
package kotlin.reflect.jvm.internal.impl.protobuf {
}
package kotlin.reflect.jvm.internal.impl.renderer {
}
package kotlin.reflect.jvm.internal.impl.resolve {
package kotlin.reflect.jvm.internal.impl.resolve.calls {
package kotlin.reflect.jvm.internal.impl.resolve.calls.inference {
}
}
package kotlin.reflect.jvm.internal.impl.resolve.constants {
}
package kotlin.reflect.jvm.internal.impl.resolve.descriptorUtil {
}
package kotlin.reflect.jvm.internal.impl.resolve.jvm {
}
package kotlin.reflect.jvm.internal.impl.resolve.scopes {
package kotlin.reflect.jvm.internal.impl.resolve.scopes.receivers {
}
}
}
package kotlin.reflect.jvm.internal.impl.serialization {
package kotlin.reflect.jvm.internal.impl.serialization.deserialization {
package kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins {
}
package kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors {
}
}
}
package kotlin.reflect.jvm.internal.impl.storage {
}
package kotlin.reflect.jvm.internal.impl.types {
package kotlin.reflect.jvm.internal.impl.types.checker {
}
package kotlin.reflect.jvm.internal.impl.types.error {
}
package kotlin.reflect.jvm.internal.impl.types.typeUtil {
}
package kotlin.reflect.jvm.internal.impl.types.typesApproximation {
}
}
package kotlin.reflect.jvm.internal.impl.util {
package kotlin.reflect.jvm.internal.impl.util.capitalizeDecapitalize {
}
package kotlin.reflect.jvm.internal.impl.util.collectionUtils {
}
}
package kotlin.reflect.jvm.internal.impl.utils {
}
}
package kotlin.reflect.jvm.internal.pcollections {
}
package kotlin.reflect.jvm.internal.structure {
}
}
}
}
package kotlin.script {
package kotlin.script.dependencies {
}
package kotlin.script.experimental {
package kotlin.script.experimental.dependencies {
}
package kotlin.script.experimental.location {
}
}
package kotlin.script.extensions {
}
package kotlin.script.templates {
package kotlin.script.templates.standard {
}
}
}
package kotlin.sequences {
}
package kotlin.system {
}
package kotlin.test {
}
package kotlin.text {
}
}
@@ -0,0 +1,54 @@
// WITH_UNSIGNED
// FILE: signedToUnsignedConversions_annotation.kt
package kotlin.internal
annotation class ImplicitIntegerCoercion
// FILE: signedToUnsignedConversions_test.kt
import kotlin.internal.ImplicitIntegerCoercion
@ImplicitIntegerCoercion
const val IMPLICIT_INT = 255
@ImplicitIntegerCoercion
const val EXPLICIT_INT: Int = 255
@ImplicitIntegerCoercion
const val LONG_CONST = 255L
@ImplicitIntegerCoercion
val NON_CONST = 255
@ImplicitIntegerCoercion
const val BIGGER_THAN_UBYTE = 256
@ImplicitIntegerCoercion
const val UINT_CONST = 42u
fun takeUByte(@ImplicitIntegerCoercion u: UByte) {}
fun takeUShort(@ImplicitIntegerCoercion u: UShort) {}
fun takeUInt(@ImplicitIntegerCoercion u: UInt) {}
fun takeULong(@ImplicitIntegerCoercion u: ULong) {}
fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) {}
fun takeLong(@ImplicitIntegerCoercion l: Long) {}
fun test() {
takeUByte(IMPLICIT_INT)
takeUByte(EXPLICIT_INT)
takeUShort(IMPLICIT_INT)
takeUShort(BIGGER_THAN_UBYTE)
takeUInt(IMPLICIT_INT)
takeULong(IMPLICIT_INT)
takeUBytes(IMPLICIT_INT, EXPLICIT_INT, 42u)
takeLong(IMPLICIT_INT)
}
@@ -0,0 +1,17 @@
FILE fqName:kotlin.internal fileName:/signedToUnsignedConversions_annotation.kt
CLASS ANNOTATION_CLASS name:ImplicitIntegerCoercion modality:FINAL visibility:public flags: superTypes:[kotlin.Annotation]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:kotlin.internal.ImplicitIntegerCoercion flags:
CONSTRUCTOR visibility:public <> () returnType:kotlin.internal.ImplicitIntegerCoercion flags:primary
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
overridden:
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
overridden:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
overridden:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
@@ -0,0 +1,136 @@
FILE fqName:<root> fileName:/signedToUnsignedConversions_test.kt
PROPERTY name:IMPLICIT_INT visibility:public modality:FINAL flags:const,val
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
FIELD PROPERTY_BACKING_FIELD name:IMPLICIT_INT type:kotlin.Int visibility:public flags:final
EXPRESSION_BODY
CONST Int type=kotlin.Int value=255
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-IMPLICIT_INT> visibility:public modality:FINAL <> () returnType:kotlin.Int flags:
correspondingProperty: PROPERTY name:IMPLICIT_INT visibility:public modality:FINAL flags:const,val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-IMPLICIT_INT>(): Int'
GET_FIELD 'IMPLICIT_INT: Int' type=kotlin.Int origin=null
PROPERTY name:EXPLICIT_INT visibility:public modality:FINAL flags:const,val
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
FIELD PROPERTY_BACKING_FIELD name:EXPLICIT_INT type:kotlin.Int visibility:public flags:final
EXPRESSION_BODY
CONST Int type=kotlin.Int value=255
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-EXPLICIT_INT> visibility:public modality:FINAL <> () returnType:kotlin.Int flags:
correspondingProperty: PROPERTY name:EXPLICIT_INT visibility:public modality:FINAL flags:const,val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-EXPLICIT_INT>(): Int'
GET_FIELD 'EXPLICIT_INT: Int' type=kotlin.Int origin=null
PROPERTY name:LONG_CONST visibility:public modality:FINAL flags:const,val
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
FIELD PROPERTY_BACKING_FIELD name:LONG_CONST type:kotlin.Long visibility:public flags:final
EXPRESSION_BODY
CONST Long type=kotlin.Long value=255
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-LONG_CONST> visibility:public modality:FINAL <> () returnType:kotlin.Long flags:
correspondingProperty: PROPERTY name:LONG_CONST visibility:public modality:FINAL flags:const,val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-LONG_CONST>(): Long'
GET_FIELD 'LONG_CONST: Long' type=kotlin.Long origin=null
PROPERTY name:NON_CONST visibility:public modality:FINAL flags:val
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
FIELD PROPERTY_BACKING_FIELD name:NON_CONST type:kotlin.Int visibility:public flags:final
EXPRESSION_BODY
CONST Int type=kotlin.Int value=255
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-NON_CONST> visibility:public modality:FINAL <> () returnType:kotlin.Int flags:
correspondingProperty: PROPERTY name:NON_CONST visibility:public modality:FINAL flags:val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-NON_CONST>(): Int'
GET_FIELD 'NON_CONST: Int' type=kotlin.Int origin=null
PROPERTY name:BIGGER_THAN_UBYTE visibility:public modality:FINAL flags:const,val
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
FIELD PROPERTY_BACKING_FIELD name:BIGGER_THAN_UBYTE type:kotlin.Int visibility:public flags:final
EXPRESSION_BODY
CONST Int type=kotlin.Int value=256
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-BIGGER_THAN_UBYTE> visibility:public modality:FINAL <> () returnType:kotlin.Int flags:
correspondingProperty: PROPERTY name:BIGGER_THAN_UBYTE visibility:public modality:FINAL flags:const,val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-BIGGER_THAN_UBYTE>(): Int'
GET_FIELD 'BIGGER_THAN_UBYTE: Int' type=kotlin.Int origin=null
PROPERTY name:UINT_CONST visibility:public modality:FINAL flags:const,val
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
FIELD PROPERTY_BACKING_FIELD name:UINT_CONST type:kotlin.UInt visibility:public flags:final
EXPRESSION_BODY
CONST Int type=kotlin.UInt value=42
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-UINT_CONST> visibility:public modality:FINAL <> () returnType:kotlin.UInt flags:
correspondingProperty: PROPERTY name:UINT_CONST visibility:public modality:FINAL flags:const,val
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-UINT_CONST>(): UInt'
GET_FIELD 'UINT_CONST: UInt' type=kotlin.UInt origin=null
FUN name:takeUByte visibility:public modality:FINAL <> (u:kotlin.UByte) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:u index:0 type:kotlin.UByte flags:
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
BLOCK_BODY
FUN name:takeUShort visibility:public modality:FINAL <> (u:kotlin.UShort) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:u index:0 type:kotlin.UShort flags:
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
BLOCK_BODY
FUN name:takeUInt visibility:public modality:FINAL <> (u:kotlin.UInt) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:u index:0 type:kotlin.UInt flags:
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
BLOCK_BODY
FUN name:takeULong visibility:public modality:FINAL <> (u:kotlin.ULong) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:u index:0 type:kotlin.ULong flags:
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
BLOCK_BODY
FUN name:takeUBytes visibility:public modality:FINAL <> (u:kotlin.UByteArray) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:u index:0 type:kotlin.UByteArray varargElementType:kotlin.UByte flags:vararg
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
BLOCK_BODY
FUN name:takeLong visibility:public modality:FINAL <> (l:kotlin.Long) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:l index:0 type:kotlin.Long flags:
annotations:
CALL 'constructor ImplicitIntegerCoercion()' type=kotlin.internal.ImplicitIntegerCoercion origin=null
BLOCK_BODY
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:
BLOCK_BODY
CALL 'takeUByte(UByte): Unit' type=kotlin.Unit origin=null
u: TYPE_OP type=kotlin.UByte origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.UByte
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:UByte modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.UByte>]
CALL '<get-IMPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY
CALL 'takeUByte(UByte): Unit' type=kotlin.Unit origin=null
u: TYPE_OP type=kotlin.UByte origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.UByte
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:UByte modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.UByte>]
CALL '<get-EXPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY
CALL 'takeUShort(UShort): Unit' type=kotlin.Unit origin=null
u: TYPE_OP type=kotlin.UShort origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.UShort
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:UShort modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.UShort>]
CALL '<get-IMPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY
CALL 'takeUShort(UShort): Unit' type=kotlin.Unit origin=null
u: TYPE_OP type=kotlin.UShort origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.UShort
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:UShort modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.UShort>]
CALL '<get-BIGGER_THAN_UBYTE>(): Int' type=kotlin.Int origin=GET_PROPERTY
CALL 'takeUInt(UInt): Unit' type=kotlin.Unit origin=null
u: TYPE_OP type=kotlin.UInt origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.UInt
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:UInt modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.UInt>]
CALL '<get-IMPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY
CALL 'takeULong(ULong): Unit' type=kotlin.Unit origin=null
u: TYPE_OP type=kotlin.ULong origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.ULong
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:ULong modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.ULong>]
CALL '<get-IMPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY
CALL 'takeUBytes(vararg UByte): Unit' type=kotlin.Unit origin=null
u: VARARG type=kotlin.UByteArray varargElementType=kotlin.UByte
TYPE_OP type=kotlin.UByte origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.UByte
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:UByte modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.UByte>]
CALL '<get-IMPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY
TYPE_OP type=kotlin.UByte origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.UByte
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:UByte modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.UByte>]
CALL '<get-EXPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY
CONST Byte type=kotlin.UByte value=42
CALL 'takeLong(Long): Unit' type=kotlin.Unit origin=null
l: TYPE_OP type=kotlin.Long origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Long modality:FINAL visibility:public flags: superTypes:[kotlin.Number; kotlin.Comparable<kotlin.Long>; java.io.Serializable]
CALL '<get-IMPLICIT_INT>(): Int' type=kotlin.Int origin=GET_PROPERTY