summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/macros
diff options
context:
space:
mode:
authorsoc <simon@ochsenreither.de>2016-04-04 22:07:55 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2016-04-04 22:07:55 +0200
commitd8aa2cdfb83de35cc0e427f26530195ccff46d51 (patch)
treeb5eef2fc5066961b4cfa9b672c8e2212d38e7d50 /src/compiler/scala/reflect/macros
parent3c466670d2526f4a1ff77e005fbc5b32cc31f52f (diff)
downloadscala-d8aa2cdfb83de35cc0e427f26530195ccff46d51.tar.gz
scala-d8aa2cdfb83de35cc0e427f26530195ccff46d51.tar.bz2
scala-d8aa2cdfb83de35cc0e427f26530195ccff46d51.zip
General cleanups and less warnings during a Scala build
Diffstat (limited to 'src/compiler/scala/reflect/macros')
-rw-r--r--src/compiler/scala/reflect/macros/contexts/Reifiers.scala4
-rw-r--r--src/compiler/scala/reflect/macros/contexts/Typers.scala4
-rw-r--r--src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala3
3 files changed, 5 insertions, 6 deletions
diff --git a/src/compiler/scala/reflect/macros/contexts/Reifiers.scala b/src/compiler/scala/reflect/macros/contexts/Reifiers.scala
index ecef1c7289..010829f6ab 100644
--- a/src/compiler/scala/reflect/macros/contexts/Reifiers.scala
+++ b/src/compiler/scala/reflect/macros/contexts/Reifiers.scala
@@ -61,9 +61,9 @@ trait Reifiers {
// logging free vars only when they are untyped prevents avalanches of duplicate messages
symtab.syms map (sym => symtab.symDef(sym)) foreach {
case FreeTermDef(_, _, binding, _, origin) if universe.settings.logFreeTerms && binding.tpe == null =>
- reporter.echo(position, "free term: %s %s".format(showRaw(binding), origin))
+ reporter.echo(position, s"free term: ${showRaw(binding)} $origin")
case FreeTypeDef(_, _, binding, _, origin) if universe.settings.logFreeTypes && binding.tpe == null =>
- reporter.echo(position, "free type: %s %s".format(showRaw(binding), origin))
+ reporter.echo(position, s"free type: ${showRaw(binding)} $origin")
case _ =>
// do nothing
}
diff --git a/src/compiler/scala/reflect/macros/contexts/Typers.scala b/src/compiler/scala/reflect/macros/contexts/Typers.scala
index baf066c7d9..a0dfbf5df1 100644
--- a/src/compiler/scala/reflect/macros/contexts/Typers.scala
+++ b/src/compiler/scala/reflect/macros/contexts/Typers.scala
@@ -40,12 +40,12 @@ trait Typers {
}
def inferImplicitValue(pt: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, pos: Position = enclosingPosition): Tree = {
- macroLogVerbose("inferring implicit value of type %s, macros = %s".format(pt, !withMacrosDisabled))
+ macroLogVerbose(s"inferring implicit value of type $pt, macros = ${!withMacrosDisabled}")
universe.analyzer.inferImplicit(universe.EmptyTree, pt, false, callsiteTyper.context, silent, withMacrosDisabled, pos, (pos, msg) => throw TypecheckException(pos, msg))
}
def inferImplicitView(tree: Tree, from: Type, to: Type, silent: Boolean = true, withMacrosDisabled: Boolean = false, pos: Position = enclosingPosition): Tree = {
- macroLogVerbose("inferring implicit view from %s to %s for %s, macros = %s".format(from, to, tree, !withMacrosDisabled))
+ macroLogVerbose(s"inferring implicit view from $from to $to for $tree, macros = ${!withMacrosDisabled}")
val viewTpe = universe.appliedType(universe.definitions.FunctionClass(1).toTypeConstructor, List(from, to))
universe.analyzer.inferImplicit(tree, viewTpe, true, callsiteTyper.context, silent, withMacrosDisabled, pos, (pos, msg) => throw TypecheckException(pos, msg))
}
diff --git a/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala b/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala
index d4b8175d28..7e700a524c 100644
--- a/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala
+++ b/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala
@@ -4,7 +4,6 @@ package runtime
import java.net.URLClassLoader
import scala.reflect.internal.Flags._
-import scala.reflect.internal.util.ScalaClassLoader
import scala.reflect.runtime.ReflectionUtils
import scala.reflect.internal.util.AbstractFileClassLoader
@@ -84,4 +83,4 @@ trait MacroRuntimes extends JavaReflectionRuntimes {
}
}
}
-} \ No newline at end of file
+}