Support fun interfaces in kotlinx-metadata
#KT-37421 Fixed
This commit is contained in:
@@ -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",
|
||||
|
||||
+1
-1
@@ -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") {
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fun interface F {
|
||||
fun String.f(x: Int)
|
||||
}
|
||||
@@ -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 {
|
||||
}
|
||||
Reference in New Issue
Block a user