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/files/run/bug4617.scala | |
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/files/run/bug4617.scala')
-rw-r--r-- | test/files/run/bug4617.scala | 15 |
1 files changed, 15 insertions, 0 deletions
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) + } +} |