I don't know. I tried to fix it at some point but did not succeed. You
can consider it a bug: I'm aware of it but I don't think there's a
ticket, so opening one would be good.
AFAIK only top-level classes have a scala signature. The signature
contains all the type information, for all its members (including
inner classes). I doubt this can be changed without a major re-design
of the pickle format. Also, AFAIK there are no top-level classes in
the REPL, everything is wrapped in 'object' definitions.
iulian
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
Ah, that pointed the way. Yes, the signature is there, just not where one might expect to find it. (The line which says "line elided for control chars: possibly a scala signature" is just that.)
sc[paulp@stem ~ (master)]$ scala29
Welcome to Scala version 2.10.0.r24909-b20110508001538 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_22).
Type in expressions to have them evaluated.
Type :help for more information.
scala> class Foo
defined class Foo
scala> println(new Foo getClass)
class $line1.$read$$iw$$iw$Foo
scala> :javap -v $line1.$read
Compiled from "<console>"
public final class $line1.$read extends java.lang.Object
SourceFile: "<console>"
ScalaSig: length = 0x3
05 00 00
RuntimeVisibleAnnotations: length = 0xB
00 01 00 04 00 01 00 05 73 00 06
minor version: 0
major version: 49
Constant pool:
const #1 = Asciz SourceFile;
const #2 = Asciz <console>;
const #3 = Asciz ScalaSig;
const #4 = Asciz Lscala/reflect/ScalaSignature;;
const #5 = Asciz bytes;
const #6 = Asciz [line elided for control chars: possibly a scala signature]
const #7 = Asciz RuntimeVisibleAnnotations;
const #8 = Asciz $line1/$read;
const #9 = class #8; // $line1/$read
const #10 = Asciz java/lang/Object;
const #11 = class #10; // java/lang/Object
You need tools.jar on your classpath.
> Also, where is the best
> place to find power mode documentation -
> https://github.com/paulp/scala-full/blob/master/src/compiler/scala/tools/nsc/interpreter/Power.scala
There's no secret documentation, you found the source. It's the subject
of my scala days talk though so it seems likely it will have a little
more documentation by then.