Accessing static members on type variables

Raffaele Sgarro raffaelesgarro at
Fri Apr 4 07:54:00 UTC 2014

Consider the following code (ideone <>):

class Outer {
  public static final String FIELD = "Success!";}
class Test<T extends Outer> {
  public String test() {
    return T.FIELD;
  } }

Does the JSL allow a type variable T to be used to access static members of
its upper bound?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the compiler-dev mailing list