mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
Comma must present now between enum entries, semicolon between last entry & first member, constructor calls must be without colons / specifiers. A swarm of tests fixed accordingly.
23 lines
446 B
Kotlin
Vendored
23 lines
446 B
Kotlin
Vendored
fun foo() {
|
|
|
|
addMouseListener(object : MouseAdapter() {
|
|
|
|
private var clickCount = 0;
|
|
|
|
override fun mouseClicked(e : MouseEvent) {
|
|
clickCount++;
|
|
if (clickCount > 3) GOD.sendMessage(GodMEssages.TOO_MANY_CLICKS);
|
|
}
|
|
})
|
|
|
|
enum class GodMessages {
|
|
TOO_MANY_CLICKS,
|
|
ONE_MORE_MESSAGE
|
|
}
|
|
|
|
// Type of this variable is GOD_AnonymousClass
|
|
val GOD = object {
|
|
fun sendMessage(message : GodMEssage) = throw RuntimeException(message.name)
|
|
};
|
|
|
|
} |