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

compiler improperly allows ++ on Character

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b46
    • CPU:
      generic
    • OS:
      solaris_8

      Description

      Due to the removal of support for compound boxing operations, the following
      program should not compile. The current compiler generates code that does
      not verify.

      class T {

          public void assertion2() {
              Character ch = 95;
              ch++;
              System.out.println("The value of char is : "+ch);
          }

          public static void main(String args[]) {
              T ref = new T();
              ref.assertion2();
          }

      }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: