aboutsummaryrefslogtreecommitdiff
path: root/tests/run/if-with-constant-cond.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/if-with-constant-cond.scala')
-rw-r--r--tests/run/if-with-constant-cond.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/run/if-with-constant-cond.scala b/tests/run/if-with-constant-cond.scala
new file mode 100644
index 000000000..db5959c84
--- /dev/null
+++ b/tests/run/if-with-constant-cond.scala
@@ -0,0 +1,9 @@
+
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ if ({ println("cond1"); true }: true) println("then1") else println("else1")
+ if ({ println("cond2"); false }: false) println("then2") else println("else2")
+ }
+
+} \ No newline at end of file