Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/fromBuilder/enums.kt
T
2021-04-13 08:25:16 +03:00

34 lines
689 B
Kotlin
Vendored

import my.println
enum class Order {
FIRST,
SECOND,
THIRD
}
enum class Planet(val m: Double, internal val r: Double) {
MERCURY(1.0, 2.0) {
override fun sayHello() {
<!UNRESOLVED_REFERENCE!>println<!>("Hello!!!")
}
},
VENERA(3.0, 4.0) {
override fun sayHello() {
<!UNRESOLVED_REFERENCE!>println<!>("Ola!!!")
}
},
EARTH(5.0, 6.0) {
override fun sayHello() {
<!UNRESOLVED_REFERENCE!>println<!>("Privet!!!")
}
};
val g: Double = <!UNINITIALIZED_VARIABLE!>G<!> * m / (r * r)
abstract fun sayHello()
companion object {
const val G = 6.67e-11
}
}