aboutsummaryrefslogtreecommitdiff
path: root/tests/run/if-with-constant-cond.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2017-04-19 06:58:40 -0500
committerGitHub <noreply@github.com>2017-04-19 06:58:40 -0500
commit02e38832668ed2a0504a77dd4f86270fa1a1d4bf (patch)
tree5f931022c36fc3cf8ef585e4bcc08f554f92142e /tests/run/if-with-constant-cond.scala
parent4623e1282ebe7dfc31cb12411fed16457ed289ca (diff)
parent983ce8da3ce321bed7f8100c00b4aa709528208e (diff)
downloaddotty-02e38832668ed2a0504a77dd4f86270fa1a1d4bf.tar.gz
dotty-02e38832668ed2a0504a77dd4f86270fa1a1d4bf.tar.bz2
dotty-02e38832668ed2a0504a77dd4f86270fa1a1d4bf.zip
Merge pull request #2267 from dotty-staging/fix-constant-lazy-vals
Fix #2266: Do not replace constant type lazy vals with constant.
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