diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-16 23:07:54 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-16 23:07:54 +0200 |
commit | b41f079b42850a287b0088b74d5aa2bde7b2eb8a (patch) | |
tree | 2151039cb40a0024fdd9fc2be08b9d2391222439 /test | |
parent | 997829f06cef218db227f90f2e3f781771a92bfe (diff) | |
download | scala-b41f079b42850a287b0088b74d5aa2bde7b2eb8a.tar.gz scala-b41f079b42850a287b0088b74d5aa2bde7b2eb8a.tar.bz2 scala-b41f079b42850a287b0088b74d5aa2bde7b2eb8a.zip |
moves isImplicit from TermSymbol to Symbol
Because classes can also be implicit.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/reflection-implicit.check | 2 | ||||
-rw-r--r-- | test/files/run/reflection-implicit.scala | 15 |
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 |