Skip to content

Fix #3683: print x.type for singleton types #6590

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 4 commits into from
Jun 5, 2019

Conversation

liufengyun
Copy link
Contributor

Fix #3683: print x.type for singleton types

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.

This is clearly the right change.

One follow-on question is whether all print output should use the new behavior except if -Yprint-debug is set.

@liufengyun
Copy link
Contributor Author

One follow-on question is whether all print output should use the new behavior except if -Yprint-debug is set.

Good question. I think we should reset -Yprint-debug to false in ReplPrinter. WDYT?

// create a new `ctx` with `-Yprint-debug` in `_ctx` reset to `false` 
class ReplPrinter(_ctx: Context) extends DecompilerPrinter( _ctx) { 
}

@odersky
Copy link
Contributor

odersky commented Jun 3, 2019

Good question. I think we should reset -Yprint-debug to false in ReplPrinter. WDYT?

Not sure what you mean? It is off by default. If someone sets it explicitly, we should honor it, I would say.

@odersky odersky merged commit 831dec3 into scala:master Jun 5, 2019
@allanrenucci allanrenucci deleted the fix-3683 branch June 5, 2019 16:08
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.

REPL: Incorrect pretty-printing of singleton types
2 participants