mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Use Intrinsics.checkNotNullParameter to throw NPE in parameter null checks
Similarly to previous commits, this method was unused, so we're changing its semantics in API version >= 1.4. #KT-22275 In Progress
This commit is contained in:
8
compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall_1_4.kt
vendored
Normal file
8
compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall_1_4.kt
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
// !API_VERSION: LATEST
|
||||
|
||||
fun test(s: String) = s?.length
|
||||
|
||||
// 0 IFNULL
|
||||
// 0 IFNONNULL
|
||||
// 0 intValue
|
||||
// 0 valueOf
|
||||
Reference in New Issue
Block a user