- InnerClasses & EnclosingMethod attributes for local classes

in multifile part members
- invocation of multifile part/facade members
(TODO: deserialized descriptor case)
- inlining of multifile part/facade members
(TODO: inline against binaries case)
This commit is contained in:
Dmitry Petrov
2015-09-10 16:43:56 +03:00
parent 6a3cd50a70
commit 2931e474e1
27 changed files with 259 additions and 82 deletions
@@ -2,4 +2,4 @@
@file:JvmMultifileClass
public fun bar(): String = barx()
private fun foox(): String = "O"
public fun foox(): String = "O"
@@ -2,4 +2,4 @@
@file:JvmMultifileClass
public fun foo(): String = foox()
private fun barx(): String = "K"
public fun barx(): String = "K"
@@ -0,0 +1,11 @@
@file:JvmName("TestPackage")
@file:JvmMultifileClass
package test
fun foo(): String = bar()
fun bar(): String {
class Local(val x: String)
return Local("OK").x
}
fun box(): String = foo()
@@ -0,0 +1,5 @@
@file:[JvmName("Util") JvmMultifileClass]
package test
internal fun internalInOtherFile() {}
public fun publicInOtherFile() {}
@@ -0,0 +1,23 @@
@file:[JvmName("Util") JvmMultifileClass]
package test
fun foo() {
privateInThisFile()
internalInThisFile()
publicInThisFile()
internalInOtherFile()
publicInOtherFile()
}
private fun privateInThisFile() {}
internal fun internalInThisFile() {}
public fun publicInThisFile() {}
// @test/1ThisFileKt.class:
// 1 INVOKESTATIC test/1ThisFileKt.privateInThisFile
// 1 INVOKESTATIC test/1ThisFileKt.internalInThisFile
// 1 INVOKESTATIC test/1ThisFileKt.publicInThisFile
// 1 INVOKESTATIC test/1OtherFileKt.internalInOtherFile
// 1 INVOKESTATIC test/1OtherFileKt.publicInOtherFile