diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-07-30 11:39:19 -0700 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-07-30 11:39:19 -0700 |
commit | 00fd27c3b4355054c883a15e08b6cc2449ae9253 (patch) | |
tree | 457b080d9e25590954ee809aad5acff5929ce602 /test/files/run/reflect-resolveoverload-named.scala | |
parent | 147e6c2768c13312144b92f1c34a53cc178212a2 (diff) | |
parent | 7d8c46479104a694c79a18861a1713a0a65e89f1 (diff) | |
download | scala-00fd27c3b4355054c883a15e08b6cc2449ae9253.tar.gz scala-00fd27c3b4355054c883a15e08b6cc2449ae9253.tar.bz2 scala-00fd27c3b4355054c883a15e08b6cc2449ae9253.zip |
Merge pull request #960 from clhodapp/remove-resolve-overloaded
Remove resolveOverloaded
Diffstat (limited to 'test/files/run/reflect-resolveoverload-named.scala')
-rw-r--r-- | test/files/run/reflect-resolveoverload-named.scala | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/files/run/reflect-resolveoverload-named.scala b/test/files/run/reflect-resolveoverload-named.scala deleted file mode 100644 index 017ec85c0d..0000000000 --- a/test/files/run/reflect-resolveoverload-named.scala +++ /dev/null @@ -1,26 +0,0 @@ - -class A { - def foo(x: String, y: Int) = 1 - def foo(x: Int, y: String) = 2 -} - -object Test extends App { - val cm = reflect.runtime.currentMirror - val u = cm.universe - val a = new A - val im = cm.reflect(a) - val tpe = u.typeOf[A] - val overloaded = tpe member u.newTermName("foo") asTermSymbol - val ms1 = - overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("x"), u.typeOf[String]), (u.newTermName("y"), u.typeOf[Int]))) - val ms2 = - overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("y"), u.typeOf[Int]), (u.newTermName("x"), u.typeOf[String]))) - val ms3 = - overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("x"), u.typeOf[Int]), (u.newTermName("y"), u.typeOf[String]))) - val ms4 = - overloaded resolveOverloaded(nameVargs = Seq((u.newTermName("y"), u.typeOf[String]), (u.newTermName("x"), u.typeOf[Int]))) - assert(im.reflectMethod(ms1 asMethodSymbol)("A", 1) == 1) - assert(im.reflectMethod(ms2 asMethodSymbol)("A", 1) == 1) - assert(im.reflectMethod(ms3 asMethodSymbol)(1, "A") == 2) - assert(im.reflectMethod(ms4 asMethodSymbol)(1, "A") == 2) -} |