Properly generate inner classes when compiling source for inline
KT-19175: Compiler generates different bytecode when classes are compiled separately or together #KT-19175 Fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class Introspector {
|
||||
inner class SchemaRetriever(val transaction: String) {
|
||||
inline fun inSchema(crossinline modifier: (String) -> Unit) =
|
||||
{ modifier(transaction) }()
|
||||
|
||||
internal fun retrieve() {
|
||||
inSchema { schema -> "OK" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTED_OBJECT_KIND: innerClass
|
||||
// TESTED_OBJECTS: Introspector$SchemaRetriever$inSchema$1, SchemaRetriever
|
||||
// FLAGS: ACC_FINAL, ACC_PUBLIC
|
||||
@@ -0,0 +1,20 @@
|
||||
interface Introspector {
|
||||
|
||||
class SchemaRetriever(val transaction: String) {
|
||||
inline fun inSchema(crossinline modifier: (String) -> Unit) =
|
||||
{ modifier(transaction) }()
|
||||
|
||||
internal fun retrieve() {
|
||||
inSchema { schema -> "OK" }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// TESTED_OBJECT_KIND: innerClass
|
||||
// TESTED_OBJECTS: Introspector$SchemaRetriever$inSchema$1, SchemaRetriever
|
||||
// FLAGS: ACC_FINAL, ACC_PUBLIC, ACC_STATIC
|
||||
|
||||
// TESTED_OBJECT_KIND: innerClass
|
||||
// TESTED_OBJECTS: Introspector$SchemaRetriever$inSchema$1, DefaultImpls
|
||||
// ABSENT: true
|
||||
@@ -0,0 +1,20 @@
|
||||
interface Introspector {
|
||||
fun test() {
|
||||
class SchemaRetriever(val transaction: String) {
|
||||
inline fun inSchema(crossinline modifier: (String) -> Unit) =
|
||||
{ modifier(transaction) }()
|
||||
|
||||
internal fun retrieve() {
|
||||
inSchema { schema -> "OK" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TESTED_OBJECT_KIND: innerClass
|
||||
// TESTED_OBJECTS: Introspector$test$SchemaRetriever, SchemaRetriever
|
||||
// FLAGS: ACC_FINAL, ACC_PUBLIC, ACC_STATIC
|
||||
|
||||
// TESTED_OBJECT_KIND: innerClass
|
||||
// TESTED_OBJECTS: Introspector$test$SchemaRetriever, DefaultImpls
|
||||
// FLAGS: ACC_FINAL, ACC_PUBLIC, ACC_STATIC
|
||||
Reference in New Issue
Block a user