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

javac produces a compile error for valid boolean expressions

XMLWordPrintable

    • b120

        This code:

        public class Test
        {
            static int a, b, c, d;

            public static void main(String[] args)
            {
                boolean cond = (a < b & c > d);
            }
        }

        compiles in 7 but fails in 8. The look ahead modifications made to the parser to process lambdas may have provoked this issue.

        reported in lambda-dev list, original mail: http://mail.openjdk.java.net/pipermail/lambda-dev/2013-November/011505.html

              vromero Vicente Arturo Romero Zaldivar
              vromero Vicente Arturo Romero Zaldivar
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: