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

Looking up an unknown symbol in particular code causes the compiler to crash

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Scala 2.11.7, Scala 2.11.8, Scala 2.12.0-M3
    • Fix Version/s: Scala 2.12.0-M5
    • Component/s: Compiler (Misc)
    • Labels:
    • Environment:

      OSX

      Description

      This is fairly minimized:

      package a
       
      case class B(c: collection.mutable.Map[Int, Int]) {
        def d(): Unit = c(undefinedSymbol) += 1
      }
      

      and crashes with the error:

      symbol value <error>#15064 does not exist in a.B.d, which contains locals

      (that last line is not truncated but has a space at the end of it in my terminal)

      It's (obviously) illegal, but it generates a compiler crash, so I thought it might be interesting.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ollijh Olli Helenius
                Reporter:
                jamesharlow James Harlow
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: