mirror of https://github.com/sbt/sbt.git
Reduce InputTask to the ideal wrapper around 'State => Parser[Initialize[Task[T]]]'
Ref #407.
This commit is contained in:
parent
e719c5fb2e
commit
2929e4e724
|
|
@ -143,6 +143,13 @@ final class ContextUtil[C <: Context](val ctx: C)
|
||||||
/** >: Nothing <: Any */
|
/** >: Nothing <: Any */
|
||||||
def emptyTypeBounds: TypeBounds = TypeBounds(definitions.NothingClass.toType, definitions.AnyClass.toType)
|
def emptyTypeBounds: TypeBounds = TypeBounds(definitions.NothingClass.toType, definitions.AnyClass.toType)
|
||||||
|
|
||||||
|
def functionType(args: List[Type], result: Type): Type =
|
||||||
|
{
|
||||||
|
val global: Global = ctx.universe.asInstanceOf[Global]
|
||||||
|
val tpe = global.definitions.functionType(args.asInstanceOf[List[global.Type]], result.asInstanceOf[global.Type])
|
||||||
|
tpe.asInstanceOf[Type]
|
||||||
|
}
|
||||||
|
|
||||||
/** Create a Tree that references the `val` represented by `vd`. */
|
/** Create a Tree that references the `val` represented by `vd`. */
|
||||||
def refVal(vd: ValDef): Tree =
|
def refVal(vd: ValDef): Tree =
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue