Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-10231

scalac crashes on Java inner class compiled with -parameters

    Details

      Description

      Outer.java

      public class Outer {
          public class Inner {
          }
      }
      

      Fail.scala

      object Fail {
        val o = new Outer
        val i = new o.Inner
      }
      

      Result:

      $ javac -parameters Outer.java 
      $ scalac -cp . Fail.scala 
      error: error while loading Inner, class file './Outer$Inner.class' is broken
      (class java.lang.IndexOutOfBoundsException/0)
      Fail.scala:3: error: Fail.o.Inner does not have a constructor
        val i = new o.Inner
                ^
      two errors found
      

      This is a 2.12 regression, it works fine in 2.11.8. Java version is 1.8.0_121

        Attachments

          Activity

            People

            • Assignee:
              rytz Lukas Rytz
              Reporter:
              ghik Roman Janusz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: