Skip to content

Conversation

@pweisenburger
Copy link
Contributor

@pweisenburger pweisenburger commented Feb 19, 2023

Fixes reflect SuperType.supertpe to return supertpe instead of thistpe.

Fixes the printer for supertypes. Maybe this could be improved as it currently ignores the supertpe field when printing. But it's aligned with PlainPrinter.

Fixes the printer to print type lambdas as =>> instead of =>.

Fixes printing private and protected modifiers (before, private was only printed when scoped to an enclosing type definition).

@pweisenburger pweisenburger force-pushed the quotes-printer-and-supertpe branch from a28bd1d to 37ca1ee Compare February 22, 2023 20:28
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

case _ => printFullClassName(within)
}
if (definition.symbol.flags.is(Flags.Protected)) {
def printWithin(within: Option[TypeRepr]) = within match
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a test for this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a test case for printing the modifiers to the second commit.

@nicolasstucki nicolasstucki merged commit 07723d7 into scala:main Jun 16, 2023
nicolasstucki added a commit that referenced this pull request Jun 22, 2023
This test had a conflict with #16968.
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