diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-17 22:02:34 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-17 22:02:34 -0700 |
commit | 144671eb943dc689e555ddc50d0d4c045182b6c8 (patch) | |
tree | 1d0a9d6abd6e3d63e3b6ee8363a3c00bae8c7612 /test/files | |
parent | 752aa52207bf0e29baeccf2ac369e80f257821b1 (diff) | |
parent | 552b6234dbbb4ff1e971e2c0f87ecd4090dd36a5 (diff) | |
download | scala-144671eb943dc689e555ddc50d0d4c045182b6c8.tar.gz scala-144671eb943dc689e555ddc50d0d4c045182b6c8.tar.bz2 scala-144671eb943dc689e555ddc50d0d4c045182b6c8.zip |
Merge pull request #2255 from retronym/ticket/7249
SI-7249 Reign in overzealous Function0 optimization.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t7249.check | 1 | ||||
-rw-r--r-- | test/files/run/t7249.scala | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/t7249.check b/test/files/run/t7249.check new file mode 100644 index 0000000000..7777e0a5a2 --- /dev/null +++ b/test/files/run/t7249.check @@ -0,0 +1 @@ +Yup! diff --git a/test/files/run/t7249.scala b/test/files/run/t7249.scala new file mode 100644 index 0000000000..375df5c3ad --- /dev/null +++ b/test/files/run/t7249.scala @@ -0,0 +1,7 @@ +object Test extends App { + def bnToLambda(s: => String): () => String = () => s + var x: () => String = () => sys.error("Nope") + val y = bnToLambda { x() } + x = () => "Yup!" + println(y()) +} |