Skip to content

Fix strawmans #1219

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

Merged
merged 14 commits into from
Apr 20, 2016
Merged

Fix strawmans #1219

merged 14 commits into from
Apr 20, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 15, 2016

I worked on a new collection strawman proposal which uncovered quite a few bugs. More bugs were discovered when trying to dotty-compile this proposal and the earlier ones and then compile DottyTest against it. All discovered errors are fixed in this PR.

Review by @VladimirNik

odersky added 14 commits April 15, 2016 11:20
New CollectionStrawMan5, executed as runttest in two different ways:

 - built with scalac, test compiled by dotty in tests/run.
 - built with dotty, test compiled by dotty using separate compilation.
1) Print RefinedTypes with their hashCode so that we can correlated with RefinedThis types
2) Fast abort of instantiate in case we have determined that it is not safe anyway
LambdaTraits are created on demand; we need to make sure
they exist when referred to from Tasty.
Partial fix of scala#765. Hack to make sure unexpandedName
works for super accessor names.
Need to drop the final `$' in both cases.
Dealias TypeRefs that get applied to type arguments. Without that
precaution we get Stackoverflows in lookupRefined/betaReduce for
CollectionStrawMan5.scala.
The previous version seemed to fail non-deterministaically, but after a while
I could not reproduce it anymore. Anyway, leaving the change in.
This means companions will be pickled and we can drop
the special treatement in transformInfo of FirstTransform.
That method is problematic, since it enters new symbols into
a class scope. This is not allowed, since transformInfo needs
to be purely functional, side effects are not permitted
(`enteredAfter` does not work either).

The problem manifested itself when compiling colltest5 with
a requirement failure in the code of `entered` when called
from FirstTransform (trying to enter in a frozen class).

TODO: Once we use statics for LazyVals we can get rid
of the "add companion object" logic in FirstTransform
alltogether.
Bring strawman-4 and strawman-5 to feature-parity.
Test also strawman-4.
@VladimirNik
Copy link
Contributor

LGTM

@DarkDimius DarkDimius merged commit 0514d0e into scala:master Apr 20, 2016
@allanrenucci allanrenucci deleted the fix-strawmans branch December 14, 2017 19:21
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.

4 participants