Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5003431

java.lang.Object cannot be dereferenced

XMLWordPrintable

    • 5.0
    • b67
    • generic
    • solaris_8
    • Verified

      See <http://forum.java.sun.com/thread.jsp?forum=316&thread=495830>

      class Test {
          static class SomeType<T> { T t = null; }

          static <T> T nil() { return (new SomeType<T>()).t; }

          public static void test() {
              nil().getClass(); // error: java.lang.Object cannot be dereferenced
          }
      }

            ahe Peter Ahe
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: