mirror of https://github.com/sbt/sbt.git
Explicitly specify type parameters in calls to KCons in KList builder.
scalac couldn't infer the type constructor otherwise.
This commit is contained in:
parent
46b739aa5a
commit
a9289ad0ce
|
|
@ -50,6 +50,8 @@ object Assign
|
||||||
bk ++= Seq(z.value)
|
bk ++= Seq(z.value)
|
||||||
)*/
|
)*/
|
||||||
|
|
||||||
|
val zz = Def.task { mk.value + tk.value + mk.value + tk.value + mk.value + tk.value + mk.value + tk.value + mk.value + tk.value + mk.value + tk.value }
|
||||||
|
|
||||||
import DefaultParsers._
|
import DefaultParsers._
|
||||||
val p = Def.setting { name.value ~> Space ~> ID }
|
val p = Def.setting { name.value ~> Space ~> ID }
|
||||||
val is = Seq(
|
val is = Seq(
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,16 @@ object KListBuilder extends TupleBuilder
|
||||||
case Nil => revBindings.reverse
|
case Nil => revBindings.reverse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private[this] def makeKList(revInputs: Inputs[c.universe.type], klist: Tree, klistType: Type): Tree =
|
||||||
|
revInputs match {
|
||||||
|
case in :: tail =>
|
||||||
|
val next = ApplyTree(TypeApply(Ident(kcons), TypeTree(in.tpe) :: TypeTree(klistType) :: TypeTree(mTC) :: Nil), in.expr :: klist :: Nil)
|
||||||
|
makeKList(tail, next, appliedType(kconsTC, in.tpe :: klistType :: mTC :: Nil))
|
||||||
|
case Nil => klist
|
||||||
|
}
|
||||||
|
|
||||||
/** The input trees combined in a KList */
|
/** The input trees combined in a KList */
|
||||||
val klist = (inputs :\ (knil: Tree))( (in, klist) => ApplyTree(kcons, in.expr, klist) )
|
val klist = makeKList(inputs.reverse, knil, knilType)
|
||||||
|
|
||||||
/** The input types combined in a KList type. The main concern is tracking the heterogeneous types.
|
/** The input types combined in a KList type. The main concern is tracking the heterogeneous types.
|
||||||
* The type constructor is tcVariable, so that it can be applied to [X] X or M later.
|
* The type constructor is tcVariable, so that it can be applied to [X] X or M later.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue