// FILE: signedToUnsignedConversions_annotation.kt package kotlin.internal open annotation class ImplicitIntegerCoercion : Annotation { constructor() /* primary */ { super/*Any*/() /* () */ } } // FILE: signedToUnsignedConversions_test.kt @ImplicitIntegerCoercion val NON_CONST: Int field = 255 get fun takeLong(@ImplicitIntegerCoercion l: Long) { } fun takeUByte(@ImplicitIntegerCoercion u: UByte) { } fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) { } fun takeUInt(@ImplicitIntegerCoercion u: UInt) { } fun takeULong(@ImplicitIntegerCoercion u: ULong) { } fun takeUShort(@ImplicitIntegerCoercion u: UShort) { } fun test() { takeUByte(u = ().toUByte()) takeUByte(u = ().toUByte()) takeUShort(u = ().toUShort()) takeUShort(u = ().toUShort()) takeUInt(u = ().toUInt()) takeULong(u = ().toULong()) takeUBytes(u = [().toUByte(), ().toUByte(), 42B]) } @ImplicitIntegerCoercion const val BIGGER_THAN_UBYTE: Int field = 256 get @ImplicitIntegerCoercion const val EXPLICIT_INT: Int field = 255 get @ImplicitIntegerCoercion const val IMPLICIT_INT: Int field = 255 get @ImplicitIntegerCoercion const val LONG_CONST: Long field = 255L get @ImplicitIntegerCoercion const val UINT_CONST: UInt field = 42 get