Skip to content

Instantly share code, notes, and snippets.

@ShaneDelmore
Created October 16, 2016 05:42
Show Gist options
  • Select an option

  • Save ShaneDelmore/ab887f2a3225f11c3bf91f66ac8dd963 to your computer and use it in GitHub Desktop.

Select an option

Save ShaneDelmore/ab887f2a3225f11c3bf91f66ac8dd963 to your computer and use it in GitHub Desktop.
Scalafmt returns illegal start of simple expression on this
//scalafmt returns: error: illegal start of simple expression
def validStringLength(min: Int, max: Int): String => Boolean = {
s =>
val len: Int = s.length
(min <= len) && (len <= max)
}
//scalafmt is fine with this
def validStringLength(min: Int, max: Int): String => String => Boolean =
s => {
val len: Int = s.length
(min <= len) && (len <= max)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment