b02948b5f7
Interface methods that were private got both the `default` and `private` modifiers when using `jvm-default=all` which is not valid. The stub will now just contain `private` in this case. This fixes KT-48013.
25 lines
499 B
Kotlin
Vendored
25 lines
499 B
Kotlin
Vendored
// !JVM_DEFAULT_MODE: enable
|
|
// EXPECTED_ERROR: (kotlin:20:5) modifier private not allowed here
|
|
|
|
interface Foo {
|
|
fun foo() {
|
|
System.out.println("foo")
|
|
}
|
|
|
|
@JvmDefault
|
|
fun foo2(a: Int) {
|
|
System.out.println("foo2")
|
|
}
|
|
|
|
fun bar()
|
|
|
|
private fun privateMethodWithDefault() {
|
|
System.out.println("privateMethodWithDefault")
|
|
}
|
|
|
|
@JvmDefault
|
|
private fun privateMethodWithDefault2() {
|
|
System.out.println("privateMethodWithDefault2")
|
|
}
|
|
}
|