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

Existential type for nested type argument fails to match #9300

Open
scabug opened this issue May 4, 2015 · 3 comments
Open

Existential type for nested type argument fails to match #9300

scabug opened this issue May 4, 2015 · 3 comments

Comments

@scabug
Copy link

scabug commented May 4, 2015

This fails to compile:

trait Id[E]

class C[TC[_[_]]] {

  val d: Set[Id[TC[I]] forSome { type I[_] }] = ???

  d.contains((???): Id[TC[Id]])

}

The error is

Bug.scala:7: error: type mismatch;
 found   : Id[TC[Id]]
 required: Id[TC[I]] forSome { type I[_] <: Any }
  d.contains((???): Id[TC[Id]])
@scabug
Copy link
Author

scabug commented May 4, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9300?orig=1
Reporter: Robin Green (ST_robin_green)
Affected Versions: 2.10.3, 2.11.6
See #4721

@scabug
Copy link
Author

scabug commented May 4, 2015

Robin Green (ST_robin_green) said:
The required type in the error message doesn't make sense to me. It says <: Any but a type constructor isn't a subclass of anything.

@scabug
Copy link
Author

scabug commented May 4, 2015

Robin Green (ST_robin_green) said:
Possibly related to #4721, although the error message is different.

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