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

existentials too eager to squash bounds of covariant parameters #5459

Closed
scabug opened this issue Feb 13, 2012 · 3 comments
Closed

existentials too eager to squash bounds of covariant parameters #5459

scabug opened this issue Feb 13, 2012 · 3 comments

Comments

@scabug
Copy link

scabug commented Feb 13, 2012

object Test {
  trait T1[-A <: AnyRef]
  trait T2[-A >: AnyRef]
  trait T3[ A <: AnyRef]
  trait T4[ A >: AnyRef]
  trait T5[+A <: AnyRef]
  trait T6[+A >: AnyRef]
  
  def f1(x: T1[_]) = x
  def f2(x: T2[_]) = x
  def f3(x: T3[_]) = x
  def f4(x: T4[_]) = x
  def f5(x: T5[_]) = x
  def f6(x: T6[_]) = x
  
  // Only f5 fails to compile:
  //   ./a.scala:13: error: type arguments [Any] do not conform to trait T5's type parameter bounds [+A <: AnyRef]
  //     def f5(x: T5[_]) = x
  //         ^
  //   one error found
}
@scabug
Copy link
Author

scabug commented Feb 13, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5459?orig=1
Reporter: @paulp

@scabug
Copy link
Author

scabug commented Jul 10, 2013

@adriaanm said:
Unassigning and rescheduling to M6 as previous deadline was missed.

@scabug
Copy link
Author

scabug commented Nov 21, 2013

@retronym said (edited on Nov 21, 2013 3:12:55 PM UTC):
Was fixed and tested in scala/scala@e28c3ed

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