summaryrefslogtreecommitdiff
path: root/test/pending/run/reify_implicits-old.scala
blob: 8ff256d2d46c658461be97a0e83e9d87897ff747 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}