Skip to content

Commit

Permalink
fixes run/macroPlugins-namerHooks.scala
Browse files Browse the repository at this point in the history
Makes run/macroPlugins-namerHooks.scala work equally well on both
Unix and Windows machines.
  • Loading branch information
xeno-by committed Jan 10, 2014
1 parent e089caf commit 945f859
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/files/run/macroPlugins-namerHooks.scala
Expand Up @@ -14,19 +14,20 @@ object Test extends DirectTest {
import analyzer._

val output = collection.mutable.ListBuffer[String]()
def log(what: String) = output += what.replace(String.format("%n"), " ")

object macroPlugin extends MacroPlugin {
override def pluginsEnterSym(namer: Namer, tree: Tree): Boolean = {
output += s"enterSym(${tree.toString.replace('\n', ' ')})"
log(s"enterSym($tree)")
namer.standardEnterSym(tree)
true
}
override def pluginsEnsureCompanionObject(namer: Namer, cdef: ClassDef, creator: ClassDef => Tree = companionModuleDef(_)): Option[Symbol] = {
output += s"ensureCompanionObject(${cdef.toString.replace('\n', ' ')}, ...)"
log(s"ensureCompanionObject($cdef, ...)")
Some(namer.standardEnsureCompanionObject(cdef, creator))
}
override def pluginsEnterStats(typer: Typer, stats: List[Tree]): List[Tree] = {
stats.foreach(stat => output += s"enterStat(${stat.toString.replace('\n', ' ')})")
stats.foreach(stat => log(s"enterStat($stat)"))
stats
}
}
Expand Down

1 comment on commit 945f859

@scala-jenkins
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Job pr-scala failed for 945f859 Took 86 min. (ping @xeno-by) (results):


To retry exactly this commit, comment "PLS REBUILD/pr-scala@945f8594756d3743487aef7c3387e5d6ce0828de" on PR 3351.
NOTE: New commits are rebuilt automatically as they appear. A forced rebuild is only necessary for transient failures.

Please sign in to comment.