Skip to content

Add scala.compiletime.summonInline #8483

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

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Mar 9, 2020

Provide a shorthand for the most common use of summonFrom.

inline def summonInline[T] <: T = summonFrom {
  case t: T => t
}

@nicolasstucki nicolasstucki self-assigned this Mar 9, 2020
@nicolasstucki nicolasstucki marked this pull request as ready for review March 9, 2020 15:22
@nicolasstucki nicolasstucki removed their assignment Mar 9, 2020
@nicolasstucki nicolasstucki requested a review from odersky March 9, 2020 15:23
@nicolasstucki nicolasstucki assigned odersky and nicolasstucki and unassigned odersky Mar 9, 2020
@nicolasstucki nicolasstucki force-pushed the add-compiletime-summoninline branch from 02ed17f to e0e9d72 Compare March 9, 2020 15:34
Provide a shorthand for the most common use of `summonFrom`.

```
inline def summonInline[T] <: T = summonFrom {
  case t: T => t
}
```
@nicolasstucki nicolasstucki force-pushed the add-compiletime-summoninline branch from b39e36f to abbeb91 Compare March 9, 2020 15:49
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@nicolasstucki nicolasstucki merged commit ff476f7 into scala:master Mar 10, 2020
@nicolasstucki nicolasstucki deleted the add-compiletime-summoninline branch March 10, 2020 15:39
@anatoliykmetyuk anatoliykmetyuk added this to the 0.23.0-RC1 milestone Mar 12, 2020
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