JVM_IR: fix a bug when isInlineParameter is applied to default stubs
If an inline parameter has a default value, its type is nullable. There's already code to handle this in `IrInlineCodegen`, but it really should be in `isInlineParameter` instead, otherwise e.g. SyntheticAccessorLowering fails.
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
// Argument `f` of `call$default` is technically nullable and inline.
|
||||
inline fun call(other: Int = 1, crossinline f: () -> String = { "fail" }) = { f() }()
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
class A {
|
||||
private fun method() = "O"
|
||||
|
||||
private val prop = "K"
|
||||
|
||||
fun test(): String = call { method() + prop }
|
||||
}
|
||||
|
||||
fun box(): String = A().test()
|
||||
Reference in New Issue
Block a user