Skip to content

Rename qctx to quotes #10442

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 1 commit into from
Nov 24, 2020
Merged

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Nov 22, 2020

Based on #10432

We add the definition of quotes that replaces the previous qctx definition. This name is more meaningful.

inline def quotes(using q: Quotes): q.type = q

def f(using Quotes)(t: quotes.reflect.Tree): Unit = 
  import quotes.refelct._
  ...

If users want shorter names they can define it themselfs

inline def q(using q: Quotes): q.type = q

def f(using Quotes)(t: q.reflect.Tree): Unit = 
  import q.refelct._
  ...

or

inline def r(using q: Quotes): q.reflect.type = q.reflect

def f(using Quotes)(t: r.Tree): Unit =
  import r._
  ...

@nicolasstucki nicolasstucki self-assigned this Nov 22, 2020
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.

LGTM

@nicolasstucki nicolasstucki added this to the 3.0.0-M2 milestone Nov 23, 2020
@nicolasstucki nicolasstucki force-pushed the rename-qctx-to-quotes branch 8 times, most recently from 3990e23 to 83f2644 Compare November 24, 2020 07:48
@nicolasstucki nicolasstucki marked this pull request as ready for review November 24, 2020 07:53
@nicolasstucki nicolasstucki merged commit 1b7d63c into scala:master Nov 24, 2020
@nicolasstucki nicolasstucki deleted the rename-qctx-to-quotes branch November 24, 2020 10:31
@Kordyjan Kordyjan modified the milestones: 3.0.0-M2, 3.0.0 Aug 2, 2023
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.

3 participants