Merge remote-tracking branch 'origin/master' into incremental
This commit is contained in:
@@ -105,4 +105,8 @@ public final class PatternMatchingTest extends SingleFileTranslationTest {
|
|||||||
public void testIfWithOneStmWhen() throws Exception {
|
public void testIfWithOneStmWhen() throws Exception {
|
||||||
fooBoxTest();
|
fooBoxTest();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public void testWhenWithOneStmWhen() throws Exception {
|
||||||
|
fooBoxTest();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
|
||||||
|
fun box(): Boolean {
|
||||||
|
var result = false
|
||||||
|
val i = 1
|
||||||
|
when (i) {
|
||||||
|
1 ->
|
||||||
|
when (i) {
|
||||||
|
1 -> result = true
|
||||||
|
else -> result = false
|
||||||
|
}
|
||||||
|
|
||||||
|
else ->
|
||||||
|
when (i) {
|
||||||
|
1 -> result = true
|
||||||
|
else -> result = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user