Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Dec 25, 2019

The following no longer crashes:

class C { type F[X <: F[_, _], Y] }

But it is still flagged as a cyclic reference error, whereas nsc accepts it. I believe it would be
tricky/risky to change dotc's algorithms to accept it as well, and I am not sure it's
necessary. Generally, we want to get away from F-bounds, so just accepting the most
common use case (F-bounds in method type parameters) is hopefully OK.

The following no longer crashes:

    class C { type F[X <: F[_, _], Y] }

But it is still flagged as a cyclic reference error, whereas nsc accepts it. I believe it would be
tricky/risky to change dotc's algorithms to accept it as well, and I am not sure it's
necessary. Generally, we want to get away from F-bounds, so just accepting the most
common use case (F-bounds in method type parameters) is hopefully OK.
@smarter smarter merged commit 2e3fbfd into scala:master Dec 25, 2019
@smarter smarter deleted the fix-#7820 branch December 25, 2019 18:10
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

Successfully merging this pull request may close these issues.

2 participants