Files
kotlin-fork/compiler/testData/ir/irText/expressions/signedToUnsignedConversions_test.fir.kt.txt
T

59 lines
1.1 KiB
Plaintext
Vendored

@ImplicitIntegerCoercion
const val IMPLICIT_INT: Int
field = 255
get
@ImplicitIntegerCoercion
const val EXPLICIT_INT: Int
field = 255
get
@ImplicitIntegerCoercion
const val LONG_CONST: Long
field = 255L
get
@ImplicitIntegerCoercion
val NON_CONST: Int
field = 255
get
@ImplicitIntegerCoercion
const val BIGGER_THAN_UBYTE: Int
field = 256
get
@ImplicitIntegerCoercion
const val UINT_CONST: UInt
field = 42
get
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() {
error("") /* ErrorCallExpression */255;
error("") /* ErrorCallExpression */255;
error("") /* ErrorCallExpression */255;
error("") /* ErrorCallExpression */256;
error("") /* ErrorCallExpression */255;
error("") /* ErrorCallExpression */255;
error("") /* ErrorCallExpression */255; 255; 42;
}