Merge pull request #1113 from retronym/ticket/si-8263

Scala 2.11 compatibility
This commit is contained in:
Grzegorz Kossakowski 2014-02-12 14:05:47 +01:00
commit 53331d9328
3 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,7 @@ final class Eval(optionsNoncp: Seq[String], classpath: Seq[File], mkReporter: Se
val value = (cl: ClassLoader) => getValue[Any](i.enclosingModule, i.loader(cl))
new EvalResult(i.extra, value, i.generated, i.enclosingModule)
}
def evalDefinitions(definitions: Seq[(String,Range)], imports: EvalImports, srcName: String, valTypes: Seq[String]): EvalDefinitions =
def evalDefinitions(definitions: Seq[(String,scala.Range)], imports: EvalImports, srcName: String, valTypes: Seq[String]): EvalDefinitions =
{
require(definitions.nonEmpty, "Definitions to evaluate cannot be empty.")
val ev = new EvalType[Seq[String]] {
@ -349,7 +349,7 @@ final class Eval(optionsNoncp: Seq[String], classpath: Seq[File], mkReporter: Se
}
/** Constructs a CompilationUnit for each definition, which can be used to independently parse the definition into a Tree.
* Additionally, a CompilationUnit for the combined definitions is constructed for use by combined compilation after parsing. */
private[this] def mkDefsUnit(srcName: String, definitions: Seq[(String,Range)]): (CompilationUnit, Seq[CompilationUnit]) =
private[this] def mkDefsUnit(srcName: String, definitions: Seq[(String,scala.Range)]): (CompilationUnit, Seq[CompilationUnit]) =
{
def fragmentUnit(content: String, lineMap: Array[Int]) = new CompilationUnit(fragmentSourceFile(srcName, content, lineMap))

View File

@ -24,7 +24,7 @@ object KListBuilder extends TupleBuilder
val kconsTC: Type = kconsTpe.typeConstructor
/** This is the L in the type function [L[x]] ... */
val tcVariable: TypeSymbol = newTCVariable(NoSymbol)
val tcVariable: TypeSymbol = newTCVariable(util.initialOwner)
/** Instantiates KCons[h, t <: KList[L], L], where L is the type constructor variable */
def kconsType(h: Type, t: Type): Type =
@ -65,4 +65,4 @@ object KListBuilder extends TupleBuilder
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

@ -25,7 +25,7 @@ object TupleNBuilder extends TupleBuilder
val ctx: c.type = c
val representationC: PolyType = {
val tcVariable: Symbol = newTCVariable(NoSymbol)
val tcVariable: Symbol = newTCVariable(util.initialOwner)
val tupleTypeArgs = inputs.map(in => typeRef(NoPrefix, tcVariable, in.tpe :: Nil).asInstanceOf[global.Type])
val tuple = global.definitions.tupleType(tupleTypeArgs)
PolyType(tcVariable :: Nil, tuple.asInstanceOf[Type] )