Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Mar 22, 2018

This fixes or silences the soundness issues discovered by the recent tightening of checks in Dotty. The main changes were

  • added lots of @uncheckedVaraiance annotations to protected[this] definitions
  • disabled specializations of WithFilter. @szeiger maybe you can take another look, the way they are they are definitely unsound.
  • added some missing overrides in Stack/Queue.

This was pretty hard going, in particular figuring out the problems in the WithFilter swamp. Please, let's merge this quickly and let's not fail dotty compilation again. It would be great if this was the last time I had to rescue the dotty build.

odersky added 6 commits March 22, 2018 18:58
The specializations were all unsound since they typically returned WithFilter of
a collection {Iterable/Map/Set} where a mutable or immutable collection was required.
We need to either drop them or come up with a sound design.
There were three methods specialized in ArrayDeque to return some structure
of ArrayDeques instead of the underlying collection type. These were inherited
without overridng by Queue and Stack. This means the contract is broken: The type
says that e.g. sliding returns an Iterator[Queue] but in reality it returns
an Iterator[ArrayDeque].
@odersky
Copy link
Contributor Author

odersky commented Mar 22, 2018

The dotty branch that compiles this has been merged into master (PR #4162). @allanrenucci can you add a commit or do a separate PR to use the right dotty version for the build?

@odersky odersky mentioned this pull request Mar 22, 2018
@allanrenucci
Copy link
Contributor

Superseded by #521

@julienrf julienrf closed this Mar 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants