Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Permit type constraints on same line
Browse files Browse the repository at this point in the history
This makes the test added in the previous commit work (oops!), and also
generally makes sense now that we have anonymous generic functions
(#108).
  • Loading branch information
lucaswerkmeister committed Jun 15, 2015
1 parent 9fc352d commit 808e010
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/ceylon/formatter/FormattingVisitor.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -2041,6 +2041,7 @@ shared class FormattingVisitor(
spaceAfter = true;
indentBefore = options.indentBeforeTypeInfo;
indentAfter = options.indentBeforeTypeInfo;
lineBreaksBefore = 1..0;
};
assert (exists context);
that.identifier.visit(this);
Expand All @@ -2052,10 +2053,7 @@ shared class FormattingVisitor(
}

shared actual void visitTypeConstraintList(TypeConstraintList that) {
for (constraint in CeylonIterable(that.typeConstraints)) {
fWriter.requireAtLeastLineBreaks(1);
constraint.visit(this);
}
CeylonIterable(that.typeConstraints)*.visit(this);
}

shared actual void visitTypedDeclaration(TypedDeclaration that) {
Expand Down

0 comments on commit 808e010

Please sign in to comment.