mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
NOTE: jvmCrossinlineLambdaDeclarationSite.kt is muted because the inliner does not remap references to an anonymous object's parent class after regenerating it. Unlike the JVM backend, JVM_IR uses the top level named class' assertion status for all inner classes. (The test used to pass because the lambda in `inline fun call` read the `$assertionsDisabled` field of `CrossinlineLambdaContainer`, which was not reloaded after changing the assertion status of package `test`.)
18 lines
449 B
Kotlin
Vendored
18 lines
449 B
Kotlin
Vendored
// KOTLIN_CONFIGURATION_FLAGS: ASSERTIONS_MODE=jvm
|
|
|
|
inline fun inlineMe() = assert(true)
|
|
|
|
class A {
|
|
fun inlineSite() {
|
|
inlineMe()
|
|
}
|
|
}
|
|
|
|
// A.inlineSite:
|
|
// 1 GETSTATIC A.\$assertionsDisabled
|
|
// A.<clinit>:
|
|
// 1 LDC LA;.class\s*INVOKEVIRTUAL java/lang/Class.desiredAssertionStatus \(\)Z
|
|
// 1 PUTSTATIC A.\$assertionsDisabled : Z
|
|
// in declaration site and in inline site
|
|
// 2 INVOKEVIRTUAL java/lang/Class.desiredAssertionStatus \(\)Z
|