eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

Additional ‘?’ after optional variables’ types in SparseFormattingOptions #8

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 11 years ago

(SparseFormattingOptions can be viewed here.)

SparseFormattingOptions decorates already optional types like Integer? with an additional ‘?’:

"The maximum line length, or `null` for unlimited line length."
shared default Integer?? maxLineLength;

While this is not wrong (the compiler infers that Integer|Null|Null is equivalent to Integer|Null), it just looks weird, and everyone who sees it and knows that that source is generated will know immediately that I forgot something there.

lucaswerkmeister commented 11 years ago

Relevant line is generate.ceylon#63.

I’ve tagged this issue “easy” with the intention that new contributors can come and fix it; I’ll hold off fixing it myself for a while, as it’s not terribly important.