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

compiler improperly allows ++ on Character

XMLWordPrintable

    • b46
    • generic
    • solaris_8

      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();
          }

      }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: