Skip to content

Fix documentation #9219

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

Conversation

ShapelessCat
Copy link
Contributor

The reflect function was renamed to to, and its references need
update

The `reflect` function was renamed to `to`, and its references need
update
Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️


```scala
def reflect[T: Type, U: Type](f: Expr[T] => Expr[U]): Expr[T => U] =
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] =
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] =
def to[T: Type, R: Type](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] =

'{ (x: T) => ${ f('x) } }
```
would be rewritten to
```scala
def reflect[T: Type, U: Type](f: Expr[T] => Expr[U]): Expr[T => U] =
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] =
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def to[T: Type, R: Type](f: Expr[T] => Expr[R]): Expr[T => R] =
def to[T: Type, R: Type](f: Expr[T] => Expr[R])(using QuoteContext): Expr[T => R] =

@ShapelessCat
Copy link
Contributor Author

@nicolasstucki The suggested changes are included.

@nicolasstucki nicolasstucki merged commit 518135d into scala:master Jun 22, 2020
@nicolasstucki
Copy link
Contributor

Thank you @ShapelessCat

@ShapelessCat ShapelessCat deleted the fix-doc-macros-function-references branch July 17, 2020 22:23
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