Skip to content

Quoted liftable derivation macro regression test #11647

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

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki self-assigned this Mar 8, 2021
@nicolasstucki nicolasstucki force-pushed the add-quoted-liftable-derivation-macro-2 branch 2 times, most recently from 24eec88 to 1ca5047 Compare March 8, 2021 09:47
@nicolasstucki nicolasstucki force-pushed the add-quoted-liftable-derivation-macro-2 branch from 1ca5047 to 811dbaa Compare March 8, 2021 10:18
@nicolasstucki nicolasstucki marked this pull request as ready for review March 8, 2021 13:29
@nicolasstucki nicolasstucki requested a review from liufengyun March 8, 2021 13:29
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

case '{ $mirrorExpr : Mirror.Product { type MirroredElemTypes = mirroredElemTypes } } =>
val liftableExprs = Expr.ofSeq(elemTypesLfts[mirroredElemTypes])
'{ new LiftableProduct[T, mirroredElemTypes]($mirrorExpr, $liftableExprs)(using $tpe) }
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Beautiful usage of quoted pattern matches 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The last thing is to be able to write enum Opt[+T] derives ToExpr.

@nicolasstucki nicolasstucki merged commit 8029713 into scala:master Mar 8, 2021
@nicolasstucki nicolasstucki deleted the add-quoted-liftable-derivation-macro-2 branch March 8, 2021 15:41
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