summaryrefslogtreecommitdiff
path: root/test/files/run/reflection-implClass.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-03-16 16:14:27 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-03-18 11:51:45 +1000
commitdc9effeb3af789d9e4a6b8e126ac73ac718270fa (patch)
tree1e133925808f155772b5ae0d604ba37bf35f6b49 /test/files/run/reflection-implClass.scala
parentc8e6050c3c190dd064642b6b77fc179f27b0495d (diff)
downloadscala-dc9effeb3af789d9e4a6b8e126ac73ac718270fa.tar.gz
scala-dc9effeb3af789d9e4a6b8e126ac73ac718270fa.tar.bz2
scala-dc9effeb3af789d9e4a6b8e126ac73ac718270fa.zip
Remove manual mixins in JFunctionN.v2.12.0-M3-dc9effe
These manual mixins were forwarding to the impl classes have just been removed. We can now rely on default methods instead. Update Tests: - Fix test/files/pos/t1237.scala, we can't have an outer field in an interface, always use the outer method. - Don't crash on meaningless trait early init fields test/files/neg/t2796.scala - Remove impl class relate parts of inner class test - Remove impl class relate parts of elidable test - Remove impl class related reflection test. - Remove test solely about trait impl classes renaming - Update check file with additional stub symbol error - Disable unstable parts of serialization test. - TODO explain, and reset the expectation
Diffstat (limited to 'test/files/run/reflection-implClass.scala')
-rw-r--r--test/files/run/reflection-implClass.scala40
1 files changed, 0 insertions, 40 deletions
diff --git a/test/files/run/reflection-implClass.scala b/test/files/run/reflection-implClass.scala
deleted file mode 100644
index 4242530dd1..0000000000
--- a/test/files/run/reflection-implClass.scala
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Tries to load a symbol for the `Foo$class` using Scala reflection.
- * Since trait implementation classes do not get pickling information
- * symbol for them should be created using fallback mechanism
- * that exposes Java reflection information dressed up in
- * a Scala symbol.
- */
-object Test extends App with Outer {
- import scala.reflect.{ClassTag, classTag}
- import scala.reflect.runtime.universe._
- import scala.reflect.runtime.{currentMirror => cm}
-
- assert(cm.classSymbol(classTag[Foo].runtimeClass).info.decl(TermName("bar")).info ==
- cm.classSymbol(classTag[Bar].runtimeClass).info.decl(TermName("foo")).info)
-
- val s1 = implClass(classTag[Foo].runtimeClass)
- assert(s1 != NoSymbol)
- assert(s1.info != NoType)
- assert(s1.companion.info != NoType)
- assert(s1.companion.info.decl(TermName("bar")) != NoSymbol)
- val s2 = implClass(classTag[Bar].runtimeClass)
- assert(s2 != NoSymbol)
- assert(s2.info != NoType)
- assert(s2.companion.info != NoType)
- assert(s2.companion.info.decl(TermName("foo")) != NoSymbol)
- def implClass(clazz: Class[_]) = {
- val implClass = Class.forName(clazz.getName + "$class")
- cm.classSymbol(implClass)
- }
-}
-
-trait Foo {
- def bar = 1
-}
-
-trait Outer {
- trait Bar {
- def foo = 1
- }
-}