Support fun interfaces in kotlinx-metadata

#KT-37421 Fixed
This commit is contained in:
Alexander Udalov
2020-05-12 20:35:26 +02:00
parent c805274d2e
commit 4520e02bae
16 changed files with 78 additions and 1 deletions
@@ -946,6 +946,7 @@ private val CLASS_FLAGS_MAP = COMMON_FLAGS_MAP + mapOf(
Flag.Class.IS_EXTERNAL to "external",
Flag.Class.IS_EXPECT to "expect",
Flag.Class.IS_INLINE to "inline",
Flag.Class.IS_FUN to "fun",
Flag.Class.IS_CLASS to "class",
Flag.Class.IS_INTERFACE to "interface",
@@ -7,7 +7,7 @@ package org.jetbrains.kotlin.kotlinp.test
import org.jetbrains.kotlin.generators.tests.generator.testGroup
fun main(args: Array<String>) {
fun main() {
System.setProperty("java.awt.headless", "true")
testGroup("libraries/tools/kotlinp/test", "libraries/tools/kotlinp/testData") {
@@ -38,6 +38,11 @@ public class KotlinpTestGenerated extends AbstractKotlinpTest {
runTest("libraries/tools/kotlinp/testData/Contracts.kt");
}
@TestMetadata("FunInterface.kt")
public void testFunInterface() throws Exception {
runTest("libraries/tools/kotlinp/testData/FunInterface.kt");
}
@TestMetadata("Lambda.kt")
public void testLambda() throws Exception {
runTest("libraries/tools/kotlinp/testData/Lambda.kt");
+3
View File
@@ -0,0 +1,3 @@
fun interface F {
fun String.f(x: Int)
}
+13
View File
@@ -0,0 +1,13 @@
// F.class
// ------------------------------------------
public abstract fun interface F : kotlin/Any {
// signature: f(Ljava/lang/String;I)V
public abstract fun kotlin/String.f(x: kotlin/Int): kotlin/Unit
// module name: test-module
}
// META-INF/test-module.kotlin_module
// ------------------------------------------
module {
}