mirror of
https://github.com/sbt/sbt.git
synced 2026-09-08 03:09:49 +02:00
address a valid unchecked warning
In order to correctly pattern match Tree subclasses in reflection/macros, scalac needs the corresponding implicit for *Tag available because the types are only abstract types.
This commit is contained in:
@@ -118,16 +118,16 @@ object TaskMacro
|
||||
|
||||
private[this] def appendMacroImpl(c: Context)(init: c.Tree, append: c.Tree)(newName: String): c.Tree =
|
||||
{
|
||||
import c.universe.{Apply,newTermName,Select,TypeApply}
|
||||
import c.universe.{Apply,ApplyTag,newTermName,Select,SelectTag,TypeApply,TypeApplyTag}
|
||||
c.macroApplication match {
|
||||
case Apply(Apply(TypeApply(Select(preT, nmeT), targs), _), a) =>
|
||||
case Apply(Apply(TypeApply(Select(preT, nmeT), targs), _), a) =>
|
||||
Apply(Apply(TypeApply(Select(preT, newTermName(newName).encodedName), targs), init :: Nil), a)
|
||||
case x => unexpectedTree(x)
|
||||
}
|
||||
}
|
||||
private[this] def transformMacroImpl(c: Context)(init: c.Tree)(newName: String): c.Tree =
|
||||
{
|
||||
import c.universe.{Apply,newTermName,Select}
|
||||
import c.universe.{Apply,ApplyTag,newTermName,Select,SelectTag}
|
||||
val target =
|
||||
c.macroApplication match {
|
||||
case Apply(Select(prefix, _), _) => prefix
|
||||
|
||||
Reference in New Issue
Block a user