mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Do not report an error on enum entry without initializer if all parameters have default values (error is still reported if there is no such constructor, or if the constructor call is ambiguous). Record resolved call on KtEnumEntry. NB is the enum entry has a corresponding subclass, we still have to generate the "default" constructor call, because FE doesn't know about the platform-specific representation of that class and its constructors. See also KT-14097, KT-15900
6 lines
91 B
Kotlin
Vendored
6 lines
91 B
Kotlin
Vendored
enum class Test(val str: String = "OK") {
|
|
OK
|
|
}
|
|
|
|
fun box(): String =
|
|
Test.OK.str |