Do not generate annotations of method parameters on its $default synthetic method

#KT-7892 Fixed
This commit is contained in:
Alexander Udalov
2015-06-01 11:57:41 +03:00
parent 4f77b44ac3
commit 28addcf8e7
6 changed files with 73 additions and 35 deletions
@@ -0,0 +1,7 @@
// KT-7892 Parameter with default value in enum's constructor breaks Java compilation
package test;
public class DefaultArgumentInEnumConstructor {
static K entry = K.ENTRY;
}
@@ -0,0 +1,5 @@
package test
enum class K(private val default: String = "default") {
ENTRY()
}
@@ -0,0 +1,28 @@
package test
public open class DefaultArgumentInEnumConstructor {
public constructor DefaultArgumentInEnumConstructor()
// Static members
public/*package*/ final var entry: test.K!
}
internal final enum class K : kotlin.Enum<test.K> {
public enum entry ENTRY : test.K {
private constructor ENTRY()
invisible_fake final /*fake_override*/ val default: kotlin.String
public final /*fake_override*/ fun compareTo(/*0*/ test.K): kotlin.Int
public final /*fake_override*/ fun name(): kotlin.String
public final /*fake_override*/ fun ordinal(): kotlin.Int
}
private constructor K(/*0*/ kotlin.String = ...)
private final val default: kotlin.String
public final /*fake_override*/ fun compareTo(/*0*/ test.K): kotlin.Int
public final /*fake_override*/ fun name(): kotlin.String
public final /*fake_override*/ fun ordinal(): kotlin.Int
// Static members
public final /*synthesized*/ fun valueOf(/*0*/ kotlin.String): test.K
public final /*synthesized*/ fun values(): kotlin.Array<test.K>
}