Skip to content

Refine import implied rules to smooth migration #6041

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 9 commits into from
Mar 27, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 7, 2019

No description provided.

@odersky
Copy link
Contributor Author

odersky commented Mar 7, 2019

9eb60f1 defines new rules for import implied which remain to be implemented.

@odersky odersky removed the stat:wip label Mar 8, 2019
@odersky odersky force-pushed the fix-import-implied branch from 569087b to f510690 Compare March 8, 2019 17:40
@odersky
Copy link
Contributor Author

odersky commented Mar 9, 2019

I moved i3430.check to pending because it made the test flakey. We could invest effort in a more robust test, but since the thing we are testing (implicit resolution disambiguation rules) is also in flux, it does not seem worth it at this point. Let's get back to it, when the new implicit resolution disambiguation rules have been fixed.

@odersky odersky requested a review from smarter March 9, 2019 09:15
@odersky
Copy link
Contributor Author

odersky commented Mar 9, 2019

Best reviewed by commit

odersky added 8 commits March 17, 2019 19:24
An import implied will also import old-style implicits, so the name is not
correct anymore.
`import implied` now also imports old-style implicits.

Missing implicits errors now report if an implied instance
could have been imported if a regular import is changed
to an import implied.
A cyclic instantiation was observed for neg/byname-implicits-11 when doing
an implicit search for a hidden implicits addendum.

It arose from a subtype check

    Foo[Foo[T]] <: Foo[T]

where `Foo` is nonvariant and T is an instantiatable TypeParamRef.
@odersky odersky force-pushed the fix-import-implied branch from 6216e1f to 3a19b43 Compare March 17, 2019 18:26
@smarter smarter merged commit 2364270 into scala:master Mar 27, 2019
@allanrenucci allanrenucci deleted the fix-import-implied branch March 27, 2019 18:19
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