diff options
Diffstat (limited to 'test/pending/jvm/constant-optimization/Foo_1.scala')
-rw-r--r-- | test/pending/jvm/constant-optimization/Foo_1.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/pending/jvm/constant-optimization/Foo_1.scala b/test/pending/jvm/constant-optimization/Foo_1.scala new file mode 100644 index 0000000000..6f408044d7 --- /dev/null +++ b/test/pending/jvm/constant-optimization/Foo_1.scala @@ -0,0 +1,9 @@ +class Foo_1 { + def foo() { + // constant optimization should eliminate all branches + val i = 1 + val x = if (i != 1) null else "good" + val y = if (x == null) "good" else x + "" + println(y) + } +}
\ No newline at end of file |