From 16b3e8c1d70a0ddf5307c6564fd34a4854e4bf77 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 28 Nov 2010 02:38:38 +0000 Subject: 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] = scala> res1.call res2: Int = 125 No review. --- test/files/run/mock.check | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 test/files/run/mock.check (limited to 'test/files/run/mock.check') diff --git a/test/files/run/mock.check b/test/files/run/mock.check new file mode 100644 index 0000000000..967c4e20bb --- /dev/null +++ b/test/files/run/mock.check @@ -0,0 +1,3 @@ +Hi, thanks for calling: that makes 1 times. +Hi, thanks for calling: that makes 2 times. +Hi, thanks for calling: that makes 3 times. -- cgit v1.2.3