mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
This undoes changes in
fbe66c3496
which broke calculation of the simple name of local classes in
reflection (the enclosing method was not a substring of the name of the
local class).
20 lines
560 B
Kotlin
Vendored
20 lines
560 B
Kotlin
Vendored
fun foo() {
|
|
fun bar() : (Int) -> Unit {
|
|
return {
|
|
1
|
|
}
|
|
}
|
|
}
|
|
|
|
// Names of local functions are used in names of local classes for IR, but only indices are used for non-IR.
|
|
|
|
// JVM_TEMPLATES
|
|
// METHOD : ItInReturnedLambdaKt$foo$1$1.invoke(I)V
|
|
// VARIABLE : NAME=this TYPE=LItInReturnedLambdaKt$foo$1$1; INDEX=0
|
|
// VARIABLE : NAME=it TYPE=I INDEX=1
|
|
|
|
// JVM_IR_TEMPLATES
|
|
// METHOD : ItInReturnedLambdaKt$foo$bar$1.invoke(I)V
|
|
// VARIABLE : NAME=this TYPE=LItInReturnedLambdaKt$foo$bar$1; INDEX=0
|
|
// VARIABLE : NAME=it TYPE=I INDEX=1
|