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

"scala is not an enclosing class" example #5536

Closed
scabug opened this issue Mar 2, 2012 · 5 comments
Closed

"scala is not an enclosing class" example #5536

scabug opened this issue Mar 2, 2012 · 5 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Mar 2, 2012

Not sure whether this is truly a bug, but when I search for "scala is not an enclosing class", the top hit claims that this represents a (family of) bugs in the Scala type checking system: http://stackoverflow.com/questions/5143849/scala-is-not-an-enclosing-class

At any rate, here's the code that produces the message:

object Test {
  import net.liftweb.json.JObject
  import net.liftweb.json.JsonDSL._
  val map: Map[Int, String] = Map(1 -> "one")
  val json: JObject = ("myMap" -> map)
}

The error message would be clearer if it gave some clue that the problem is that you can convert from a Map[String, ?] to a JObject, but not a Map[Int, ?].

@scabug
Copy link
Author

scabug commented Mar 2, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5536?orig=1
Reporter: Nebu Pookins (nebu)
Affected Versions: 2.8.1

@scabug
Copy link
Author

scabug commented Apr 27, 2012

@jrudolph said:
Have you tried with Scala 2.9.x? It seems like a duplicate of #3152, which eventually was fixed.

@scabug
Copy link
Author

scabug commented Jun 25, 2012

@adriaanm said:
this one's probably both cannot reproduce and fixed
i'm pretty sure about the former (i don't have lift lying around)
and Johannes hinted at the latter

@scabug
Copy link
Author

scabug commented Jun 25, 2012

Nebu Pookins (nebu) said:
Sorry, I forgot about this issue until I got the notification from Adriaan Moors. I just tested on 2.9.2, and I indeed get a more precise compile error now.

@scabug
Copy link
Author

scabug commented Jun 25, 2012

@adriaanm said:
No worries, thanks for testing!

@scabug scabug closed this as completed Jun 25, 2012
@scabug scabug added this to the 2.9.2 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants