These are chat archives for typelevel/scala

Oct 2016
Jon Pretty
Oct 30 2016 14:27

I expressed some concern to @milessabin a couple of days ago that a class compiled with Typelevel Scala which uses a singleton literal type in a signature would produce a .class file with a ScalaSignature which encodes this literal type (whilst, in the bytecode, it would would just be erased to its non-singleton widened type), and that a library released with such types in the signatures would not be usable from vanilla Scala because it may not know how to read the encodings of these types in the ScalaSignatures.

I did a couple of tests, and this doesn't seem to be a problem: I can compile a class with a return type of 1 using a Typelevel build of 2.11.8, and Vanilla 2.11.8 will happily read it, and indeed sees the return type as Int(1).

All good. :)

Miles Sabin
Oct 30 2016 14:33
That's going to be fine.
The problem case would be a singleton typed Symbol, eg. def foo: 'Blah = 'Blah ... give that a try.