Add -Ywarn-unused & -Ywarn-unused-import, & fix warnings

This commit is contained in:
Dale Wijnand 2016-06-19 11:42:31 +01:00
parent 1651df2090
commit 37f4e8311e
5 changed files with 1 additions and 11 deletions

View File

@ -3,7 +3,6 @@ package appmacro
import scala.reflect._
import macros._
import scala.tools.nsc.Global
import ContextUtil.{ DynamicDependencyError, DynamicReferenceError }
object ContextUtil {

View File

@ -23,7 +23,6 @@ trait MonadInstance extends Instance {
import scala.reflect._
import macros._
import reflect.internal.annotations.compileTimeOnly
object Instance {
final val ApplyName = "app"

View File

@ -1,8 +1,6 @@
package sbt.internal.util
package appmacro
import Types.Id
import scala.tools.nsc.Global
import scala.reflect._
import macros._
@ -59,7 +57,6 @@ object KListBuilder extends TupleBuilder {
val klistType: Type = (inputs :\ knilType)((in, klist) => kconsType(in.tpe, klist))
val representationC = internal.polyType(tcVariable :: Nil, klistType)
val resultType = appliedType(representationC, idTC :: Nil)
val input = klist
val alistInstance: ctx.universe.Tree = TypeApply(select(Ident(alist), "klist"), TypeTree(representationC) :: Nil)
def extract(param: ValDef) = bindKList(param, Nil, inputs.map(_.local))

View File

@ -1,8 +1,6 @@
package sbt.internal.util
package appmacro
import Types.Id
import scala.tools.nsc.Global
import scala.reflect._
import macros._

View File

@ -1,7 +1,6 @@
package sbt.internal.util
package appmacro
import Types.Id
import scala.tools.nsc.Global
import scala.reflect._
import macros._
@ -17,11 +16,10 @@ object TupleNBuilder extends TupleBuilder {
def make(c: blackbox.Context)(mt: c.Type, inputs: Inputs[c.universe.type]): BuilderResult[c.type] = new BuilderResult[c.type] {
val util = ContextUtil[c.type](c)
import c.universe.{ Apply => ApplyTree, _ }
import c.universe._
import util._
val global: Global = c.universe.asInstanceOf[Global]
val mTC: Type = mt.asInstanceOf[c.universe.Type]
val ctx: c.type = c
val representationC: PolyType = {
@ -30,7 +28,6 @@ object TupleNBuilder extends TupleBuilder {
val tuple = global.definitions.tupleType(tupleTypeArgs)
internal.polyType(tcVariable :: Nil, tuple.asInstanceOf[Type])
}
val resultType = appliedType(representationC, idTC :: Nil)
val input: Tree = mkTuple(inputs.map(_.expr))
val alistInstance: Tree = {