Light classes: generate ACC_STATIC for DefaultImpls classes

To provide consistency between light classes and their delegates

IdeLightClass#testExtendingInterfaceWithDefaultImpls still failing since
    we do not generate implementations delegating to DefaultImpls of superinterfaces
This commit is contained in:
Pavel V. Talanov
2017-04-05 16:19:55 +03:00
parent 5e351061e8
commit 32d3a1b4c9
4 changed files with 7 additions and 5 deletions
@@ -64,5 +64,5 @@ object LightClassTestCommon {
// Actual text for light class is generated with ClsElementImpl.appendMirrorText() that can find empty DefaultImpl inner class in stubs
// for all interfaces. This inner class can't be used in Java as it generally is not seen from light classes built from Kotlin sources.
// It is also omitted during classes generation in backend so it also absent in light classes built from compiled code.
fun removeEmptyDefaultImpls(text: String) : String = text.replace("\n final class DefaultImpls {\n }\n", "")
fun removeEmptyDefaultImpls(text: String) : String = text.replace("\n static final class DefaultImpls {\n }\n", "")
}