Skip to content

Fix printing of package object symbol #4731

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
merged 2 commits into from
Jul 3, 2018

Conversation

allanrenucci
Copy link
Contributor

No description provided.

if (sym.is(ModuleClass)) {
val name =
if (sym.isPackageObject) sym.owner.name
else sym.name.stripModuleClassSuffix
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sym.name is package$ for package object

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense to me, but is this testable without too much effort? Otherwise I'll need to figure out an example to try this out... (that is, write a test.)

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've added a test case

@allanrenucci allanrenucci merged commit a6b6690 into scala:master Jul 3, 2018
@allanrenucci allanrenucci deleted the package-object branch July 3, 2018 15:10
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