mirror of https://github.com/sbt/sbt.git
Add recommended compiler flags, fix most of the warnings
This commit is contained in:
parent
527dd51aa0
commit
5a769891d5
|
|
@ -36,7 +36,7 @@ object ContextUtil {
|
|||
}
|
||||
|
||||
// TODO 2.11 Remove this after dropping 2.10.x support.
|
||||
private object HasCompat { val compat = ??? }; import HasCompat._
|
||||
private object HasCompat { val compat = this }; import HasCompat._
|
||||
|
||||
/**
|
||||
* Utility methods for macros. Several methods assume that the context's universe is a full compiler (`scala.tools.nsc.Global`).
|
||||
|
|
@ -134,10 +134,14 @@ final class ContextUtil[C <: Context](val ctx: C) {
|
|||
def mkTuple(args: List[Tree]): Tree =
|
||||
global.gen.mkTuple(args.asInstanceOf[List[global.Tree]]).asInstanceOf[ctx.universe.Tree]
|
||||
|
||||
def setSymbol[Tree](t: Tree, sym: Symbol): Unit =
|
||||
def setSymbol[Tree](t: Tree, sym: Symbol): Unit = {
|
||||
t.asInstanceOf[global.Tree].setSymbol(sym.asInstanceOf[global.Symbol])
|
||||
def setInfo[Tree](sym: Symbol, tpe: Type): Unit =
|
||||
()
|
||||
}
|
||||
def setInfo[Tree](sym: Symbol, tpe: Type): Unit = {
|
||||
sym.asInstanceOf[global.Symbol].setInfo(tpe.asInstanceOf[global.Type])
|
||||
()
|
||||
}
|
||||
|
||||
/** Creates a new, synthetic type variable with the specified `owner`. */
|
||||
def newTypeVariable(owner: Symbol, prefix: String = "T0"): TypeSymbol =
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import macros._
|
|||
/** A `TupleBuilder` that uses a KList as the tuple representation.*/
|
||||
object KListBuilder extends TupleBuilder {
|
||||
// TODO 2.11 Remove this after dropping 2.10.x support.
|
||||
private object HasCompat { val compat = ??? }; import HasCompat._
|
||||
private object HasCompat { val compat = this }; import HasCompat._
|
||||
|
||||
def make(c: Context)(mt: c.Type, inputs: Inputs[c.universe.type]): BuilderResult[c.type] = new BuilderResult[c.type] {
|
||||
val ctx: c.type = c
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ object TupleNBuilder extends TupleBuilder {
|
|||
final val TupleMethodName = "tuple"
|
||||
|
||||
// TODO 2.11 Remove this after dropping 2.10.x support.
|
||||
private object HasCompat { val compat = ??? }; import HasCompat._
|
||||
private object HasCompat { val compat = this }; import HasCompat._
|
||||
|
||||
def make(c: Context)(mt: c.Type, inputs: Inputs[c.universe.type]): BuilderResult[c.type] = new BuilderResult[c.type] {
|
||||
val util = ContextUtil[c.type](c)
|
||||
|
|
|
|||
Loading…
Reference in New Issue