zinc icon indicating copy to clipboard operation
zinc copied to clipboard

Classes used only in generic positions not recorded in javac analysis

Open stuhood opened this issue 9 years ago • 0 comments

When a class is used only in a generic position by a consumer, erasure causes it to be "mostly" removed from the classfile. This means that zinc's javac analysis will not recognize the dependency between two classes.

A synthetic example:

public List<Object> emptyList() {
  List<Foo> emptyFooList = new List<Foo>();
  return emptyFooList;
}

But in some positions, the erased type is recorded as a Signature, and could be extracted.

stuhood avatar Jul 13 '16 19:07 stuhood