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

Javac accepts char literal as template

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • 21, 22
    • tools
    • None
    • 21
    • b10

    Description

      Code:

      public class Demo {
          public static void main(String[] args) {
              System.out.println(STR.'\{1+2}');
          }
      }

      Latest javac (build 22-ea+7-489) compiles this and produces 3 as an
      output. I believe this is a mistake in the compiler.

      Attachments

        Issue Links

          Activity

            People

              jlaskey Jim Laskey
              tvaleev Tagir Valeev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: