diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-28 02:38:38 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-28 02:38:38 +0000 |
commit | 16b3e8c1d70a0ddf5307c6564fd34a4854e4bf77 (patch) | |
tree | db6782e00e0aed4ee3085e14740b0c4d9df49e7d /test/files/pos/bug3106.scala | |
parent | a5553b8384a6e4cb6071846368bb0d17be2e246f (diff) | |
download | scala-16b3e8c1d70a0ddf5307c6564fd34a4854e4bf77.tar.gz scala-16b3e8c1d70a0ddf5307c6564fd34a4854e4bf77.tar.bz2 scala-16b3e8c1d70a0ddf5307c6564fd34a4854e4bf77.zip |
Fleshed out the mock code a little further so i...
Fleshed out the mock code a little further so it's easy for closures to
become SAMs.
// implicit not necessary, but improves fun factor
scala> implicit def mkUFn(x: AnyRef) = scala.tools.reflect.UniversalFn(x)
mkUFn: (x: AnyRef)scala.tools.reflect.UniversalFn
scala> (() => 5*5*5).as[java.util.concurrent.Callable[Int]]
res1: java.util.concurrent.Callable[Int] = <function1>
scala> res1.call
res2: Int = 125
No review.
Diffstat (limited to 'test/files/pos/bug3106.scala')
0 files changed, 0 insertions, 0 deletions