diff options
Diffstat (limited to 'test/files/run/reify_implicits-old.scala')
-rw-r--r-- | test/files/run/reify_implicits-old.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/reify_implicits-old.scala b/test/files/run/reify_implicits-old.scala new file mode 100644 index 0000000000..a4e90488e5 --- /dev/null +++ b/test/files/run/reify_implicits-old.scala @@ -0,0 +1,17 @@ + +import scala.language.{ implicitConversions, reflectiveCalls } +import scala.reflect.runtime.universe._ +import scala.tools.reflect.Eval + +object Test extends App { + reify { + implicit def arrayWrapper[A : ClassManifest](x: Array[A]) = + new { + def sort(p: (A, A) => Boolean) = { + util.Sorting.stableSort(x, p); x + } + } + val x = Array(2, 3, 1, 4) + println("x = "+ x.sort((x: Int, y: Int) => x < y).toList) + }.eval +} |