summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-17 07:19:16 -0700
committerPaul Phillips <paulp@improving.org>2012-09-17 07:19:16 -0700
commitcc94a21b694e132c945eafa9022b3a6e19e804fb (patch)
treeb953674685a0f4ef4d0bb02cad911ab6a083e7ab /test
parent61c83d2903f1c68c943ea646e75b4ca32d75f991 (diff)
parentb41f079b42850a287b0088b74d5aa2bde7b2eb8a (diff)
downloadscala-cc94a21b694e132c945eafa9022b3a6e19e804fb.tar.gz
scala-cc94a21b694e132c945eafa9022b3a6e19e804fb.tar.bz2
scala-cc94a21b694e132c945eafa9022b3a6e19e804fb.zip
Merge pull request #1320 from scalamacros/topic/is-implicit
moves isImplicit from TermSymbol to Symbol
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