From e23df839b736756af6ff7d6d826b7765b8b8cd65 Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Tue, 10 Jul 2012 21:01:49 +0400 Subject: [PATCH] Make compiler projects compilable with 2.10 --- compile/Eval.scala | 8 ++++---- compile/inc/Incremental.scala | 2 +- compile/persist/AnalysisFormats.scala | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/compile/Eval.scala b/compile/Eval.scala index fa0c2a346..f9cbb38e6 100644 --- a/compile/Eval.scala +++ b/compile/Eval.scala @@ -115,9 +115,9 @@ final class Eval(optionsNoncp: Seq[String], classpath: Seq[File], mkReporter: Se Block(List(Apply(Select(Super(This(emptyTypeName), emptyTypeName), nme.CONSTRUCTOR), Nil)), Literal(Constant(()))) ) - def method = DefDef(NoMods, WrapValName, Nil, Nil, tpt, tree) - def moduleBody = Template(List(gen.scalaScalaObjectConstr), emptyValDef, List(emptyInit, method)) - def moduleDef = ModuleDef(NoMods, objectName, moduleBody) + def method = DefDef(NoMods, newTermName(WrapValName), Nil, Nil, tpt, tree) + def moduleBody = Template(List(gen.scalaAnyRefConstr), emptyValDef, List(emptyInit, method)) + def moduleDef = ModuleDef(NoMods, newTermName(objectName), moduleBody) parser.makePackaging(0, emptyPkg, (imports :+ moduleDef).toList) } @@ -230,4 +230,4 @@ private object Eval } private val classDirFilter: FileFilter = DirectoryFilter || GlobFilter("*.class") -} \ No newline at end of file +} diff --git a/compile/inc/Incremental.scala b/compile/inc/Incremental.scala index 3e3069542..dbc4b2d0b 100644 --- a/compile/inc/Incremental.scala +++ b/compile/inc/Incremental.scala @@ -76,7 +76,7 @@ object Incremental shortcutSameSource(a, b) || (!hasMacro && SameAPI(a,b)) } - def shortcutSameSource(a: Source, b: Source): Boolean = !a.hash.isEmpty && !b.hash.isEmpty && sameCompilation(a.compilation, b.compilation) && (a.hash deepEquals b.hash) + def shortcutSameSource(a: Source, b: Source): Boolean = !a.hash.isEmpty && !b.hash.isEmpty && sameCompilation(a.compilation, b.compilation) && (a.hash.deep equals b.hash.deep) def sameCompilation(a: Compilation, b: Compilation): Boolean = a.startTime == b.startTime && a.target == b.target def changedInitial(entry: String => Option[File], sources: Set[File], previousAnalysis: Analysis, current: ReadStamps, forEntry: File => Option[Analysis])(implicit equivS: Equiv[Stamp]): InitialChanges = diff --git a/compile/persist/AnalysisFormats.scala b/compile/persist/AnalysisFormats.scala index 6b6dc2798..15c910eb4 100644 --- a/compile/persist/AnalysisFormats.scala +++ b/compile/persist/AnalysisFormats.scala @@ -49,11 +49,10 @@ object AnalysisFormats implicit def infosFormat(implicit infoF: Format[Map[File, SourceInfo]]): Format[SourceInfos] = wrap[SourceInfos, Map[File, SourceInfo]]( _.allInfos, SourceInfos.make _) - implicit def infoFormat(implicit infoF: Format[Problem]): Format[SourceInfo] = + implicit def infoFormat: Format[SourceInfo] = wrap[SourceInfo, (Seq[Problem],Seq[Problem])](si => (si.reportedProblems, si.unreportedProblems), { case (a,b) => SourceInfos.makeInfo(a,b)}) - implicit def problemFormat(implicit posF: Format[Position], msgF: Format[String], sevF: Format[Severity]): Format[Problem] = - asProduct4(problem _)( p => (p.category, p.position, p.message, p.severity)) + implicit def problemFormat: Format[Problem] = asProduct4(problem _)( p => (p.category, p.position, p.message, p.severity)) implicit def positionFormat: Format[Position] = asProduct7( position _ )( p => (m2o(p.line), p.lineContent, m2o(p.offset), m2o(p.pointer), m2o(p.pointerSpace), m2o(p.sourcePath), m2o(p.sourceFile)))