mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
10 lines
230 B
Kotlin
Vendored
10 lines
230 B
Kotlin
Vendored
// KT-7753: attempt to call enum constructor explicitly
|
|
enum class A(val c: Int) {
|
|
ONE(1),
|
|
TWO(2);
|
|
|
|
fun createA(): A {
|
|
// Error should be here!
|
|
return <!ENUM_CLASS_CONSTRUCTOR_CALL!>A(10)<!>
|
|
}
|
|
} |