Load unsigned constants from class file with the use of expected type
This commit is contained in:
Vendored
+6
@@ -10,7 +10,13 @@ annotation class Ann(
|
||||
val ulong: ULong
|
||||
)
|
||||
|
||||
const val ubyteConst: UByte = 10u
|
||||
const val ushortConst: UShort = 20u
|
||||
const val uintConst = 30u
|
||||
const val ulongConst = 40uL
|
||||
|
||||
class A {
|
||||
fun unsigned(s: @Ann(1u, 2u, 3u, 4u) String) {}
|
||||
fun <@Ann(0xFFu, 0xFFFFu, 0xFFFF_FFFFu, 0xFFFF_FFFF_FFFF_FFFFuL) T> typeParam() {}
|
||||
fun unsignedConsts(s: @Ann(ubyteConst, ushortConst, uintConst, ulongConst) String) {}
|
||||
}
|
||||
|
||||
Vendored
+10
@@ -1,9 +1,19 @@
|
||||
package test
|
||||
|
||||
public const val ubyteConst: kotlin.UByte = 10.toUByte()
|
||||
public fun <get-ubyteConst>(): kotlin.UByte
|
||||
public const val uintConst: kotlin.UInt = 30.toUInt()
|
||||
public fun <get-uintConst>(): kotlin.UInt
|
||||
public const val ulongConst: kotlin.ULong = 40.toULong()
|
||||
public fun <get-ulongConst>(): kotlin.ULong
|
||||
public const val ushortConst: kotlin.UShort = 20.toUShort()
|
||||
public fun <get-ushortConst>(): kotlin.UShort
|
||||
|
||||
public final class A {
|
||||
/*primary*/ public constructor A()
|
||||
public final fun </*0*/ @test.Ann(ubyte = -1.toUByte(), uint = -1.toUInt(), ulong = -1.toULong(), ushort = -1.toUShort()) T> typeParam(): kotlin.Unit
|
||||
public final fun unsigned(/*0*/ s: @test.Ann(ubyte = 1.toUByte(), uint = 3.toUInt(), ulong = 4.toULong(), ushort = 2.toUShort()) kotlin.String): kotlin.Unit
|
||||
public final fun unsignedConsts(/*0*/ s: @test.Ann(ubyte = 10.toUByte(), uint = 30.toUInt(), ulong = 40.toULong(), ushort = 20.toUShort()) kotlin.String): kotlin.Unit
|
||||
}
|
||||
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE, AnnotationTarget.TYPE_PARAMETER}) public final annotation class Ann : kotlin.Annotation {
|
||||
|
||||
Reference in New Issue
Block a user