diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-08 16:56:13 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-08 16:56:13 -0700 |
commit | f82a1d122cb20dc9924f80ebcc9d31da46bd4f29 (patch) | |
tree | f1c8e1065f234c816216624ea564f7a0f3e0242e /test/files/run/reflection-magicsymbols.check | |
parent | 97a88cc3956414c898c4dab27f32cd7a9a367e3f (diff) | |
parent | a3fe989833cc482dbae04a2e2f822a74cad67a36 (diff) | |
download | scala-f82a1d122cb20dc9924f80ebcc9d31da46bd4f29.tar.gz scala-f82a1d122cb20dc9924f80ebcc9d31da46bd4f29.tar.bz2 scala-f82a1d122cb20dc9924f80ebcc9d31da46bd4f29.zip |
Merge pull request #843 from scalamacros/ticket/6036
SI-6036 yet again makes sense of magic symbols
Diffstat (limited to 'test/files/run/reflection-magicsymbols.check')
-rw-r--r-- | test/files/run/reflection-magicsymbols.check | 22 |
1 files changed, 22 insertions, 0 deletions
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>
|