Fix for KT-7544: Backend fails when inlining nested calls with reified type parameter and default value parameter
#KT-7544 Fixed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package test
|
||||
|
||||
trait A<T> {
|
||||
fun run(): T;
|
||||
}
|
||||
|
||||
inline fun bar(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) y: () -> String) = object : A<String> {
|
||||
override fun run() : String {
|
||||
return call(y)
|
||||
}
|
||||
}
|
||||
|
||||
public inline fun <T> call(inlineOptions(InlineOption.ONLY_LOCAL_RETURN) f: () -> T): T = object : A<T> {
|
||||
override fun run() : T {
|
||||
return f()
|
||||
}
|
||||
}.run()
|
||||
Reference in New Issue
Block a user