summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/reflection-implicit.check2
-rw-r--r--test/files/run/reflection-implicit.scala15
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/reflection-implicit.check b/test/files/run/reflection-implicit.check
new file mode 100644
index 0000000000..bab1518c45
--- /dev/null
+++ b/test/files/run/reflection-implicit.check
@@ -0,0 +1,2 @@
+List(true, true, true, true)
+true
diff --git a/test/files/run/reflection-implicit.scala b/test/files/run/reflection-implicit.scala
new file mode 100644
index 0000000000..637ef24e14
--- /dev/null
+++ b/test/files/run/reflection-implicit.scala
@@ -0,0 +1,15 @@
+import scala.reflect.runtime.universe._
+
+class C {
+ implicit val v = new C
+ implicit def d(x: C)(implicit c: C): Int = ???
+ implicit class X(val x: Int)
+}
+
+object Test extends App {
+ val decls = typeOf[C].typeSymbol.typeSignature.declarations.sorted.toList.filter(sym => !sym.isTerm || (sym.isMethod && !sym.asMethod.isConstructor))
+ println(decls map (_.isImplicit))
+ val param = decls.find(_.name.toString == "d").get.asMethod.params.last.head
+ param.typeSignature
+ println(param.isImplicit)
+} \ No newline at end of file