Skip to content

Instantly share code, notes, and snippets.

@asflierl
Created January 4, 2013 17:21
Show Gist options
  • Save asflierl/4454330 to your computer and use it in GitHub Desktop.
Save asflierl/4454330 to your computer and use it in GitHub Desktop.
line 3 and 5 seem to work just fine; line 4 yields that unfriendly error message
[error] package.scala:4: macros cannot be partially applied
[error] def mf(args: Any*): String = sc.f(args:_*).stripMargin
[error] ^
package object app {
implicit class MultilineInterpolation(val sc: StringContext) extends AnyVal {
def ms(args: Any*): String = sc.s(args:_*).stripMargin
def mf(args: Any*): String = sc.f(args:_*).stripMargin
def mraw(args: Any*): String = sc.raw(args:_*).stripMargin
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment