diff options
author | Paul Phillips <paulp@improving.org> | 2011-05-19 18:08:15 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-05-19 18:08:15 +0000 |
commit | ccceeeb179c4d60155b6c5c9a96c8497ce25398f (patch) | |
tree | 69ed00ab743146cb9a5f406e020b323b7c71acb6 /test | |
parent | 63735b31ef24092bec5aa117e45ff582fab82dc8 (diff) | |
download | scala-ccceeeb179c4d60155b6c5c9a96c8497ce25398f.tar.gz scala-ccceeeb179c4d60155b6c5c9a96c8497ce25398f.tar.bz2 scala-ccceeeb179c4d60155b6c5c9a96c8497ce25398f.zip |
Apparent assumption that Literal(0) would be ad...
Apparent assumption that Literal(0) would be adapted to Literal(0.0f) as
necessary mercilessly invalidated. Fixed mkZero to account for all types
explicitly. Closes #4617, no review.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/bug4617.check | 1 | ||||
-rw-r--r-- | test/files/run/bug4617.scala | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/bug4617.check b/test/files/run/bug4617.check new file mode 100644 index 0000000000..6bbcce30eb --- /dev/null +++ b/test/files/run/bug4617.check @@ -0,0 +1 @@ +Str 8.0 diff --git a/test/files/run/bug4617.scala b/test/files/run/bug4617.scala new file mode 100644 index 0000000000..2fea5e29ec --- /dev/null +++ b/test/files/run/bug4617.scala @@ -0,0 +1,15 @@ +object Test { + def f1 = new { def f { lazy val d = 0d } } + def f2 = { + lazy val d = 4D + lazy val f = 4f + + def bar = "Str " + (d + f) + bar + } + + def main(args: Array[String]): Unit = { + f1 + println(f2) + } +} |