mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Otherwise some tools break (e.g. CheckMethodAdapter in ASM, used in generic signature writer) because they expect class names to be Java identifiers. Some tests fixed, some will be fixed in future commits
27 lines
482 B
Kotlin
27 lines
482 B
Kotlin
import kotlin.test.assertEquals
|
|
|
|
enum class Season {
|
|
WINTER
|
|
SPRING
|
|
SUMMER
|
|
AUTUMN
|
|
}
|
|
|
|
fun bar1(x : Season) : String {
|
|
return when (x) {
|
|
Season.WINTER, Season.SPRING -> "winter_spring"
|
|
Season.SUMMER -> "summer"
|
|
else -> "autumn"
|
|
}
|
|
}
|
|
|
|
fun bar2(x : Season) : String {
|
|
return when (x) {
|
|
Season.WINTER, Season.SPRING -> "winter_spring"
|
|
Season.SUMMER -> "summer"
|
|
Season.AUTUMN -> "autumn"
|
|
}
|
|
}
|
|
|
|
// 2 TABLESWITCH
|