Skip to content

SI-4700 Types with symbolic names print in infix by default #2718

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 1 commit into from
Jun 9, 2017

Conversation

smarter
Copy link
Member

@smarter smarter commented Jun 8, 2017

This a partial port of scala/scala#5589 to
dotty: when pretty-printing an applied type, if its type constructor has
a symbolic name, then always print it in infix form. The PR in scalac
also adds an @showAsInfix annotation to control this behavior, but we
cannot do the same in dotty since we still rely on the standard library
from Scala 2.11 and the annotation only exists in 2.12 and up.

This a partial port of scala/scala#5589 to
dotty: when pretty-printing an applied type, if its type constructor has
a symbolic name, then always print it in infix form. The PR in scalac
also adds an `@showAsInfix` annotation to control this behavior, but we
cannot do the same in dotty since we still rely on the standard library
from Scala 2.11 and the annotation only exists in 2.12 and up.
@smarter smarter requested a review from odersky June 8, 2017 19:34
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.

LGTM

@smarter smarter merged commit 1d24a1b into scala:master Jun 9, 2017
@allanrenucci allanrenucci deleted the infix-prettyprint branch December 14, 2017 19:23
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