Fix mapping of nullable generic underlying types of inline classes
#KT-32162 Fixed
This commit is contained in:
@@ -16,6 +16,9 @@ value class ICIntArray(val i: IntArray)
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class ICIntN<T: Int?>(val i: T)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class ICIntN2<T: Int>(val i: T?)
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class ICIntNArray(val i: Array<Int?>)
|
||||
|
||||
@@ -43,6 +46,10 @@ class CIntArray
|
||||
@AnnArray([ICIntN::class])
|
||||
class CIntN
|
||||
|
||||
@Ann(ICIntN2::class)
|
||||
@AnnArray([ICIntN2::class])
|
||||
class CIntN2
|
||||
|
||||
@Ann(ICIntNArray::class)
|
||||
@AnnArray([ICIntNArray::class])
|
||||
class CIntNArray
|
||||
@@ -73,6 +80,9 @@ fun box(): String {
|
||||
klass = (CIntN::class.annotations.first() as Ann).c.toString()
|
||||
if (klass != "class test.ICIntN") return "Expected class test.ICIntN, got $klass"
|
||||
|
||||
klass = (CIntN2::class.annotations.first() as Ann).c.toString()
|
||||
if (klass != "class test.ICIntN2") return "Expected class test.ICIntN2, got $klass"
|
||||
|
||||
klass = (CIntNArray::class.annotations.first() as Ann).c.toString()
|
||||
if (klass != "class test.ICIntNArray") return "Expected class test.ICIntNArray, got $klass"
|
||||
|
||||
@@ -98,6 +108,9 @@ fun box(): String {
|
||||
klass = (CIntN::class.annotations.last() as AnnArray).c[0].toString()
|
||||
if (klass != "class test.ICIntN") return "Expected class test.ICIntN, got $klass"
|
||||
|
||||
klass = (CIntN2::class.annotations.last() as AnnArray).c[0].toString()
|
||||
if (klass != "class test.ICIntN2") return "Expected class test.ICIntN2, got $klass"
|
||||
|
||||
klass = (CIntNArray::class.annotations.last() as AnnArray).c[0].toString()
|
||||
if (klass != "class test.ICIntNArray") return "Expected class test.ICIntNArray, got $klass"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user