summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2014-08-02 14:24:54 -0700
committerSom Snytt <som.snytt@gmail.com>2014-08-12 08:41:14 -0700
commit2e3583b3644f3acd67933b54b9b61e6d60e9b6bb (patch)
tree44b86f84a504f109e3c524a98a92babc50c7af5e /src/library
parent7a6947487dc8ea551ff7489b07cc30366b39d25e (diff)
downloadscala-2e3583b3644f3acd67933b54b9b61e6d60e9b6bb.tar.gz
scala-2e3583b3644f3acd67933b54b9b61e6d60e9b6bb.tar.bz2
scala-2e3583b3644f3acd67933b54b9b61e6d60e9b6bb.zip
SI-8512 Infer a type for f"$args"
The f-interpolator gets a type param that better be Any to avoid unfortunate widenings. Hey, it worked! Unfortunately, when `Any` is inferred, `-Xlint:infer-any` takes notice. This is probably a greater problem for the f-interpolator than for quasiquotes, which are a more specialized tool.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/StringContext.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/StringContext.scala b/src/library/scala/StringContext.scala
index 2d2601c6fb..20a328ec8f 100644
--- a/src/library/scala/StringContext.scala
+++ b/src/library/scala/StringContext.scala
@@ -163,7 +163,7 @@ case class StringContext(parts: String*) {
*/
// The implementation is hardwired to `scala.tools.reflect.MacroImplementations.macro_StringInterpolation_f`
// Using the mechanism implemented in `scala.tools.reflect.FastTrack`
- def f(args: Any*): String = macro ???
+ def f[A >: Any](args: A*): String = macro ???
}
object StringContext {