summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2015-02-22 18:50:33 +0100
committerEugene Burmako <xeno.by@gmail.com>2015-02-22 18:50:33 +0100
commit97f7f5868961264d60a65cfdc3f8e8cdd6502164 (patch)
treed71ae18664d0fac9a8ae95f0e78112bac2fbaa2b /src/compiler
parent3a32ae3651f69237bde32598674bc135ad9e4064 (diff)
downloadscala-97f7f5868961264d60a65cfdc3f8e8cdd6502164.tar.gz
scala-97f7f5868961264d60a65cfdc3f8e8cdd6502164.tar.bz2
scala-97f7f5868961264d60a65cfdc3f8e8cdd6502164.zip
fixes pluginsEnterStats
Initial implementation of pluginsEnterStats was incorrect, because I got the foldLeft wrong, making it perpetuate the initial value of stats. This worked fine if zero or one macro plugins were active at a time, but broke down if there were multiple of such plugins (concretely, I discovered this issue when trying to marry macro paradise with scalahost).
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala b/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala
index 5a70d4c524..2c27bdb03a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/AnalyzerPlugins.scala
@@ -447,6 +447,6 @@ trait AnalyzerPlugins { self: Analyzer =>
// performance opt
if (macroPlugins.isEmpty) stats
else macroPlugins.foldLeft(stats)((current, plugin) =>
- if (!plugin.isActive()) current else plugin.pluginsEnterStats(typer, stats))
+ if (!plugin.isActive()) current else plugin.pluginsEnterStats(typer, current))
}
}