[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,47 @@
//KT-1185 Support full enumeration check for 'when'
package kt1185
enum class Direction {
NORTH,
SOUTH,
WEST,
EAST
}
class A {
companion object {
}
}
enum class Color(val rgb : Int) {
RED(0xFF0000),
GREEN(0x00FF00),
BLUE(0x0000FF)
}
fun foo(d: Direction) = when(d) { //no 'else' should be requested
Direction.NORTH -> 1
Direction.SOUTH -> 2
A -> 1
Direction.WEST -> 3
Direction.EAST -> 4
}
fun foo1(d: Direction) = when(d) {
Direction.NORTH -> 1
Direction.SOUTH -> 2
Direction.WEST -> 3
}
fun bar(c: Color) = when (c) {
Color.RED -> 1
Color.GREEN -> 2
Color.BLUE -> 3
}
fun bar1(c: Color) = when (c) {
Color.RED -> 1
Color.GREEN -> 2
}