Skip to content

Fix #13947 - Get type parameters for a TypeRepr #13949

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

Closed
wants to merge 6 commits into from

Conversation

cchantep
Copy link
Contributor

No description provided.

@KacperFKorban
Copy link
Member

Mima filters need to be updated. Necessary filters are printed in logs and should be added to project/MimaFilters.scala.

@cchantep
Copy link
Contributor Author

Mima filters need to be updated. Necessary filters are printed in logs and should be added to project/MimaFilters.scala.

Done

Copy link
Contributor

@nicolasstucki nicolasstucki 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

@@ -36,7 +36,6 @@ import scala.annotation.internal.sharable
import config.Printers.typr

object Symbols {
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
object Symbols {
object Symbols {

inline def printTypeParams[A]: Unit = ${ printTypeParamsImpl[A] }

def printTypeParamsImpl[A: Type](using q: Quotes): Expr[Unit] = {
import q.reflect.*
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
import q.reflect.*
import quotes.reflect.*


inline def printTypeParams[A]: Unit = ${ printTypeParamsImpl[A] }

def printTypeParamsImpl[A: Type](using q: Quotes): Expr[Unit] = {
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 printTypeParamsImpl[A: Type](using q: Quotes): Expr[Unit] = {
def printTypeParamsImpl[A: Type](using Quotes): Expr[Unit] = {

@nicolasstucki
Copy link
Contributor

@cchantep could you also squash the commits and rebase?

@nicolasstucki
Copy link
Contributor

This was merged in #14088

@cchantep cchantep deleted the fix/13947 branch February 24, 2022 11:01
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.

No way to list the type parameters from a quotes Symbol or TypeRepr
3 participants