mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-07 15:53:18 +00:00
Fix for KT-7999: Wrong result when use nullable types as reified parameter, KT-8043: Unsafe cast to reified parameter throws NPE instead of TypeCastException
#KT-7999 Fixed #KT-8043 Fixed ~
This commit is contained in:
15
compiler/testData/codegen/bytecodeText/reifiedIsCheckWithNullable.kt
vendored
Normal file
15
compiler/testData/codegen/bytecodeText/reifiedIsCheckWithNullable.kt
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
inline fun <reified T> Any?.foo() = this is T?
|
||||
|
||||
inline fun <reified Y> Any?.foo2() = foo<Y?>()
|
||||
|
||||
inline fun <reified Z> Any?.foo3() = foo2<Z>()
|
||||
|
||||
inline fun <reified X> Any?.foo4() = foo2<X?>()
|
||||
|
||||
inline fun <reified A> Any?.foo5() = foo<A>()
|
||||
|
||||
// 1 LDC "T\?"
|
||||
// 1 LDC "Y\?"
|
||||
// 1 LDC "Z\?"
|
||||
// 1 LDC "X\?"
|
||||
// 1 LDC "A\?"
|
||||
Reference in New Issue
Block a user