JVM IR: fix flags of $default methods in multi-file facades

Do not change origin of multifile class bridges to something else
because, as it turns out, there are numerous origin-specific checks in
the codegen that start to behave differently for multifile bridges.
Instead of the method-targeted origin MULTIFILE_BRIDGE, use new class
origin JVM_MULTIFILE_CLASS to detect whether a declaration is a
multifile bridge.

 #KT-40198 Fixed
 #KT-43145 Fixed
This commit is contained in:
Alexander Udalov
2020-11-04 17:54:11 +01:00
parent d326d6a693
commit 500b1cfbd3
19 changed files with 210 additions and 76 deletions
@@ -0,0 +1,24 @@
// WITH_RUNTIME
// The difference of JVM and JVM_IR in generating privateFunction here is reported at KT-41841.
// FILE: test.kt
@file:JvmMultifileClass
@file:JvmName("A")
private fun private(x: String = "") {}
private inline fun privateInline(x: String, y: Int = 0) {}
internal fun internal(x: String = "") {}
internal inline fun internalInline(x: String, y: Int = 0) {}
@PublishedApi
internal fun published(x: String = "") {}
@PublishedApi
internal fun publishedInline(x: String = "") {}
public fun public(x: String = "") {}
public inline fun publicInline(x: String, y: Int = 0) {}