I'm currently playing with ASM and analysing the classes' generics signatures. The documented possible content in this section is described here and could be summarised with the following grammar:
TypeSignature: Z | C | B | S | I | F | J | D | FieldTypeSignature
FieldTypeSignature: ClassTypeSignature | [ TypeSignature | TypeVar
ClassTypeSignature: L Id ( / Id ) TypeArgs? ( . Id TypeArgs? )* ;*
TypeArgs: < TypeArg+ >
TypeArg: ** | ( + | - )? FieldTypeSignature*
TypeVar: T Id ;
However, I found for one case that it's not true:
trait SomeTrait
class SomeClass[T <: SomeTrait]
Generics signature for SomeClass
: <T::LSomeTrait;>Ljava/lang/Object;
I don't understand why ::
appeared here and what does it mean. Doubled :
is not valid from the grammar point of view. What's interesting, if I'll replace trait
with abstract class
the ::
will be replaced with a single :
(what's expected).
Any ideas?