Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Created April 28, 2014 14:04
Show Gist options
  • Select an option

  • Save pedrofurla/11373093 to your computer and use it in GitHub Desktop.

Select an option

Save pedrofurla/11373093 to your computer and use it in GitHub Desktop.
Playframework template WTF?
// FINE!
@reports.zip(exec.Comparisons2.totalTimeColors).map { case (r@ElapsedTimeOf(title, elapsed ),color) =>
@{oneSeries(elapsed.time, title, "column", color, 0)}
}.reduce(_ + (new Html(",")) + _)
---------------
// BAD! ->
@reports.zip(exec.Comparisons2.totalTimeColors).map {
case (r@ElapsedTimeOf(title, elapsed ),color) =>
@{oneSeries(elapsed.time, title, "column", color, 0)}
}.reduce(_ + (new Html(",")) + _)
Error:
[error] /Users/pedrofurla/dev/projects/slick/slick-perf/src/main/twirl/templates/plots3.scala.html:70: missing arguments for method elapsed in object Chronograph2;
[error] follow this method with `_' if you want to treat it as a partially applied function
[error] case (r@ElapsedTimeOf(title, elapsed ),color) =>
[error] ^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment