Switch when to phi. (#172)
This commit is contained in:
@@ -279,6 +279,14 @@ task when5(type: RunKonanTest) {
|
||||
source = "codegen/branching/when5.kt"
|
||||
}
|
||||
|
||||
task when6(type: RunKonanTest) {
|
||||
source = "codegen/branching/when6.kt"
|
||||
}
|
||||
|
||||
task when7(type: RunKonanTest) {
|
||||
source = "codegen/branching/when7.kt"
|
||||
}
|
||||
|
||||
task when_through(type: RunKonanTest) {
|
||||
source = "codegen/branching/when_through.kt"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
if (true) foo() else foo()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun main(args: Array<String>) {
|
||||
val b = args.size < 1
|
||||
val x = if (b) Any() else throw Error()
|
||||
}
|
||||
Reference in New Issue
Block a user