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

Original type of an AST should be made available even if it is replaced with an ErrorType

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 7
    • tools
    • b37
    • x86
    • windows_xp
    • Not verified

      When error is encountered in the types, the real type is lost. Need to have a way to get the original type despite of the error type.
      This is reported/needed by NetBeans.

      An example is the following code...

      import java.util.*;
      class FooBar {
        void fooBar() {
          Iterator<Number> itr = null;
          String str = itr.next();
        }
      }

      In the code above the type of itr.next() is ErrorType. (The initialization is invalid.) Tools need to have a way to get the "original" type, so they can perform code manipulations.

            jjg Jonathan Gibbons
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: