diff options
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/i2077.check | 1 | ||||
-rw-r--r-- | tests/run/i2077.scala | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/run/i2077.check b/tests/run/i2077.check new file mode 100644 index 000000000..45b983be3 --- /dev/null +++ b/tests/run/i2077.check @@ -0,0 +1 @@ +hi diff --git a/tests/run/i2077.scala b/tests/run/i2077.scala new file mode 100644 index 000000000..42b629b90 --- /dev/null +++ b/tests/run/i2077.scala @@ -0,0 +1,10 @@ +object Test { + inline val x = true + val y = if (x) 1 else 2 // reduced to val y = 1 + + def main(args: Array[String]): Unit = + if ({ println("hi"); true }) // cannot be reduced + 1 + else + 2 +} |