KAPT: Kapt generates illegal stubs for private interface methods

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.
This commit is contained in:
Nicklas Ansman Giertz
2022-09-14 16:30:59 -04:00
committed by nataliya.valtman
parent 1cc46ab7fa
commit b02948b5f7
9 changed files with 51 additions and 1 deletions
@@ -1,4 +1,5 @@
// !JVM_DEFAULT_MODE: all
// EXPECTED_ERROR: (kotlin:15:5) modifier private not allowed here
interface Foo {
fun foo() {
@@ -10,4 +11,8 @@ interface Foo {
}
fun bar()
private fun privateMethodWithDefault() {
System.out.println("privateMethodWithDefault")
}
}