Skip to content

Commit

Permalink
Fix failure on definitions without parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Dubiel committed Dec 22, 2013
1 parent 2f56154 commit 443ebf3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ trait ExprFormatter { self: HasFormattingPreferences with AnnotationFormatter wi

type Params = (ParamClause, Option[Token])
type Result = (FormatResult, FormatterState, Option[IntertokenFormatInstruction])
val breakLine = paramClauses.rangeOpt.map(_.length > formattingPreferences(BreakMultipleParameterGroups.BreakingThreshold)).get
val breakLine = paramClauses.rangeOpt.map(_.length > formattingPreferences(BreakMultipleParameterGroups.BreakingThreshold)).getOrElse(false)
val ParamClauses(_, paramClausesAndNewlines) = paramClauses
val start: Result = (FormatResult.EMPTY, formatterState, None: Option[IntertokenFormatInstruction])
paramClausesAndNewlines.foldLeft(start) { (accumulator: Result, current: Params) =>
Expand Down

0 comments on commit 443ebf3

Please sign in to comment.