Correct boxing for functional types containing inline classes

This commit is contained in:
Mikhail Zarechenskiy
2018-02-09 08:48:15 +03:00
parent a8a9f774d0
commit d606e5bc89
10 changed files with 111 additions and 1 deletions
@@ -0,0 +1,19 @@
// !LANGUAGE: +InlineClasses
class Inv<T>
inline class UInt(val value: Int)
inline class ULong(val value: Long)
object Test {
fun uIntToULong(f: (UInt) -> ULong) {}
fun listOfUIntsToListOfULongs(f: (List<UInt>) -> List<ULong>) {}
}
// method: Test::uIntToULong
// jvm signature: (Lkotlin/jvm/functions/Function1;)V
// generic signature: (Lkotlin/jvm/functions/Function1<-LUInt;LULong;>;)V
// method: Test::listOfUIntsToListOfULongs
// jvm signature: (Lkotlin/jvm/functions/Function1;)V
// generic signature: (Lkotlin/jvm/functions/Function1<-Ljava/util/List<LUInt;>;+Ljava/util/List<LULong;>;>;)V