Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

scabug opened this Issue May 17, 2016 · 2 comments


None yet
2 participants
Copy link

scabug commented May 17, 2016

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:

{code}symbol value #15064 does not exist in a.B.d, which contains locals{code}

(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.


This comment has been minimized.

Copy link

scabug commented May 17, 2016

Imported From:
Reporter: James Harlow (jamesharlow)
Affected Versions: 2.11.7, 2.11.8, 2.12.0-M3
Duplicates #8763


This comment has been minimized.

Copy link

scabug commented May 19, 2016

@liff said:
Slightly smaller test case:

object T9781 {
  val c: collection.mutable.Map[Int, Int] = ???
  c(undefinedSymbol) += 1

and a PR against 2.12: scala/scala#5179

@scabug scabug closed this May 24, 2016

@scabug scabug added this to the 2.12.0-M5 milestone Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.