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

jdk8 javac -source 7 compiles test case it should not

    Details

    • Subcomponent:
    • Resolved In Build:
      b08
    • Verification:
      Verified

      Backports

        Description

        This test case used to result in a crash. The crash was fixed in b120 and this test case now unexpectedly compiles when using jdk8 javac and -source 7.

        @interface Simple {}
        class Test {
        void m1() { Integer i = new @Simple Integer(10); }
        void m2() { throw new @Simple RuntimeException(); }
        }


        It fails to compile as expected with jdk7 and jdk8.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jlahoda Jan Lahoda
                  Reporter:
                  ssides Steve Sides
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: