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

classManifest[List[_]] doesn't work under some rare conditions #6329

Closed
scabug opened this issue Sep 6, 2012 · 3 comments
Closed

classManifest[List[_]] doesn't work under some rare conditions #6329

scabug opened this issue Sep 6, 2012 · 3 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Sep 6, 2012

object Test extends App {
  implicit val m1 = classManifest[Int]
  implicit val m2 = classManifest[String]
  println(classManifest[List[_]])
  // same bug happens for: println(classManifest[List[Any]])
}
C:\Projects\Kepler\sandbox @ ticket/6329>myke compile Test.scala
Test.scala:7: error: ambiguous implicit values:
 both value m1 in object Test of type => ClassManifest[Int]
 and value m2 in object Test of type => ClassManifest[String]
 match expected type scala.reflect.OptManifest[Any]
  println(classManifest[List[Any]])
                       ^
one error found
@scabug
Copy link
Author

scabug commented Sep 6, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6329?orig=1
Reporter: @xeno-by

@scabug
Copy link
Author

scabug commented Sep 6, 2012

@xeno-by said:
OptManifest is covariant in T (no idea why), hence implicit manifests in scope can prevent some manifests from being constructed (for types that are subtypes of the lub of those manifests).

@scabug
Copy link
Author

scabug commented Nov 21, 2013

@retronym said:
The residual test cases pass now, I've graduated them from pending: scala/scala#3175

@scabug scabug closed this as completed Nov 21, 2013
@scabug scabug added this to the 2.11.0-M2 milestone Apr 7, 2017
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

2 participants