Accessing static members on type variables

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


Consider the following code (ideone <http://ideone.com/GtBQEy>):

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: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20140404/3d5faad8/attachment.html>


More information about the compiler-dev mailing list