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

java.lang.Object cannot be dereferenced

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b67
    • CPU:
      generic
    • OS:
      solaris_8
    • Verification:
      Verified

      Description

      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
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ahe Peter Ahe
              Reporter:
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: