Skip to content

Higher-kinded F-bounded types are not recognized #974

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

Closed
smarter opened this issue Nov 24, 2015 · 2 comments
Closed

Higher-kinded F-bounded types are not recognized #974

smarter opened this issue Nov 24, 2015 · 2 comments
Assignees

Comments

@smarter
Copy link
Member

smarter commented Nov 24, 2015

This causes a stack overflow:

class Foo[A]
class Bar[CC[X] <: Foo[CC[X]]]

The reason why is explained in #943 (comment)

@smarter
Copy link
Member Author

smarter commented Nov 25, 2015

Reproduced with ./scala-scala/src/library/scala/collection/generic/MutableSortedSetFactory.scala

@odersky
Copy link
Contributor

odersky commented Dec 11, 2015

There are still two test failures in scala-collections-whitelist which are suspected instances of #974. @smarter can you take a look at them?

@smarter smarter assigned odersky and unassigned smarter Jan 13, 2016
odersky added a commit to odersky/dotty that referenced this issue Jan 14, 2016
containsRefinedThis inspects symbols and infos of named types in order
to avoid needless traversals. As i974 shows, this can lead to infinite
recursions. The fix is not to force a NamedType denotation, assume the
worst and traverse the prefix if a NamedType is not yet populated
with a denotation.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
odersky added a commit to dotty-staging/dotty that referenced this issue Jan 14, 2016
containsRefinedThis inspects symbols and infos of named types in order
to avoid needless traversals. As i974 shows, this can lead to infinite
recursions. The fix is not to force a NamedType denotation, assume the
worst and traverse the prefix if a NamedType is not yet populated
with a denotation.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
odersky added a commit to dotty-staging/dotty that referenced this issue Jan 15, 2016
containsRefinedThis inspects symbols and infos of named types in order
to avoid needless traversals. As i974 shows, this can lead to infinite
recursions. The fix is not to force a NamedType denotation, assume the
worst and traverse the prefix if a NamedType is not yet populated
with a denotation.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
odersky added a commit to dotty-staging/dotty that referenced this issue Jan 15, 2016
containsRefinedThis inspects symbols and infos of named types in order
to avoid needless traversals. As i974 shows, this can lead to infinite
recursions. The fix is not to force a NamedType denotation, assume the
worst and traverse the prefix if a NamedType is not yet populated
with a denotation.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
odersky added a commit to dotty-staging/dotty that referenced this issue Jan 15, 2016
Need to also look info refined types.
Need to handle case where we hit a NoCompleter again.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
odersky added a commit to dotty-staging/dotty that referenced this issue Jan 16, 2016
Need to also look info refined types.
Need to handle case where we hit a NoCompleter again.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
smarter pushed a commit to dotty-staging/dotty that referenced this issue Jan 16, 2016
Need to also look info refined types.
Need to handle case where we hit a NoCompleter again.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
smarter pushed a commit to dotty-staging/dotty that referenced this issue Jan 16, 2016
Need to also look info refined types.
Need to handle case where we hit a NoCompleter again.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
DarkDimius pushed a commit to dotty-linker/dotty that referenced this issue May 9, 2016
Need to also look info refined types.
Need to handle case where we hit a NoCompleter again.

Fixes scala#974 and makes MutableSortedSetFactory in stdlib compile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants