From a3fe989833cc482dbae04a2e2f822a74cad67a36 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 6 Jul 2012 21:13:44 +0400 Subject: SI-6036 yet again makes sense of magic symbols --- test/files/run/reflection-magicsymbols.check | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/files/run/reflection-magicsymbols.check (limited to 'test/files/run/reflection-magicsymbols.check') diff --git a/test/files/run/reflection-magicsymbols.check b/test/files/run/reflection-magicsymbols.check new file mode 100644 index 0000000000..2600847d99 --- /dev/null +++ b/test/files/run/reflection-magicsymbols.check @@ -0,0 +1,22 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> import scala.reflect.runtime.universe._ +import scala.reflect.runtime.universe._ + +scala> class A { def foo(x: Int*) = 1 } +defined class A + +scala> val sig = typeOf[A] member newTermName("foo") typeSignature +warning: there were 1 feature warnings; re-run with -feature for details +sig: reflect.runtime.universe.Type = (x: )scala.Int + +scala> val x = sig.asInstanceOf[MethodType].params.head +x: reflect.runtime.universe.Symbol = value x + +scala> println(x.typeSignature) +scala.Int* + +scala> -- cgit v1.2.3