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

GenBCode crashes after inlining Option.getOrElse

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.12.0-M2
    • Component/s: None
    • Labels:
      None

      Description

      class C {
        def f(o: Option[C]) = o.getOrElse(throw new NoSuchElementException(""))
      }
      

      with latest 2.12.x

      ➜  sandbox git:(yoptInScala) qsc -Yopt:l:classpath Test.scala
      java.lang.AssertionError: assertion failed: jvmWiseLUB for null or nothing: Lscala/runtime/Nothing$; - Ljava/lang/Object;
      	at scala.Predef$.assert(Predef.scala:165)
      	at scala.tools.nsc.backend.jvm.BTypes$ClassBType.jvmWiseLUB(BTypes.scala:945)
      	at scala.tools.nsc.backend.jvm.BCodeHelpers$CClassWriter.getCommonSuperClass(BCodeHelpers.scala:71)
      	at scala.tools.asm.ClassWriter.getMergedType(ClassWriter.java:1654)
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: