Skip to content

Remove quoted.Type synthesization #9448

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 8 commits into from
Jul 29, 2020

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jul 27, 2020

  • Add scala.quoted.Type.apply[T]. Just as $t is equivalent to t.T, '[T] is equivalent to Type[T].
  • Remove the implicit search synthesizer for quoted.Type
  • Simplify printing

@nicolasstucki nicolasstucki changed the title Move Staging phase after typer Improve quoted.Type synthesization Jul 27, 2020
Now it is a plain `given` definition and follows the normal implicit resulution rules.
Dealiasing of local inconsitent type aliases references are handled by `PCPCheckAndHeal`
before healing is atempted.
@nicolasstucki nicolasstucki changed the title Improve quoted.Type synthesization Remove quoted.Type synthesization Jul 28, 2020
@nicolasstucki nicolasstucki marked this pull request as ready for review July 28, 2020 18:32
@nicolasstucki nicolasstucki requested a review from liufengyun July 28, 2020 18:32
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplification 👍

case NoPrefix if level > levelOf(tp.symbol) && !tp.typeSymbol.hasAnnotation(defn.InternalQuoted_QuoteTypeTagAnnot) =>
tp.dealias match
case `tp` => tryHeal(tp.symbol, tp, pos)
case tp1 => apply(tp1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't clear in the previous comment. I mean what about doing dealiasing at line 175?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that is too much dealiasing. There are a few aliases that we care about, such as the type splices.
I will revert this change.

@nicolasstucki nicolasstucki merged commit 86a92e4 into scala:master Jul 29, 2020
@nicolasstucki nicolasstucki deleted the move-staging-phase branch July 29, 2020 10:31
@liufengyun liufengyun mentioned this pull request Aug 14, 2020
7 tasks
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