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

compiler crashes when referencing private[this] values in closure #8007

Closed
scabug opened this issue Nov 24, 2013 · 3 comments
Closed

compiler crashes when referencing private[this] values in closure #8007

scabug opened this issue Nov 24, 2013 · 3 comments

Comments

@scabug
Copy link

scabug commented Nov 24, 2013

compiler produces unhandled exception in this self-explanatory snippet:

package object Bug {
  // final class Test { - OK
  // object Test { - OK
  trait Test { // need to be trait
    //private val outer = 1 - OK
    private[this] val outer = 1 // need to be private[this]
    val inner : Int => Int = x => x + outer //generate any closure
  }
}
@scabug
Copy link
Author

scabug commented Nov 24, 2013

Imported From: https://issues.scala-lang.org/browse/SI-8007?orig=1
Reporter: ayvango
Affected Versions: 2.10.3
Attachments:

  • comp.out (created on Nov 24, 2013 3:41:18 AM UTC, 21560 bytes)

@scabug
Copy link
Author

scabug commented Nov 24, 2013

ayvango said:
I should apologize for duplicating issue( #5508 ). There is no excuse in lacking searching skills since the previous ticket was opened by myself

@scabug
Copy link
Author

scabug commented Nov 24, 2013

ayvango said:
#5508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant