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

jdk8 javac -source 7 compiles test case it should not

XMLWordPrintable

    • b08
    • Verified

        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.

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

                Created:
                Updated:
                Resolved: