diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2015-02-22 18:50:33 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2015-02-22 18:50:33 +0100 |
commit | 97f7f5868961264d60a65cfdc3f8e8cdd6502164 (patch) | |
tree | d71ae18664d0fac9a8ae95f0e78112bac2fbaa2b /test/files/run/macroPlugins-enterStats.check | |
parent | 3a32ae3651f69237bde32598674bc135ad9e4064 (diff) | |
download | scala-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 'test/files/run/macroPlugins-enterStats.check')
-rw-r--r-- | test/files/run/macroPlugins-enterStats.check | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/files/run/macroPlugins-enterStats.check b/test/files/run/macroPlugins-enterStats.check new file mode 100644 index 0000000000..133b1ae1af --- /dev/null +++ b/test/files/run/macroPlugins-enterStats.check @@ -0,0 +1,30 @@ +[[syntax trees at end of typer]] // newSource1.scala +package <empty> { + class C extends scala.AnyRef { + def <init>(): C = { + C.super.<init>(); + () + }; + def x: Int = 2; + def xmacroPlugin1: Nothing = scala.this.Predef.???; + def xmacroPlugin2: Nothing = scala.this.Predef.???; + def xmacroPlugin2macroPlugin1: Nothing = scala.this.Predef.???; + def y: Int = 3; + def ymacroPlugin1: Nothing = scala.this.Predef.???; + def ymacroPlugin2: Nothing = scala.this.Predef.???; + def ymacroPlugin2macroPlugin1: Nothing = scala.this.Predef.??? + } +} + +macroPlugin2:enterStat(class C extends scala.AnyRef { def <init>() = { super.<init>(); () }; def x = 2; def y = 3 }) +macroPlugin1:enterStat(class C extends scala.AnyRef { def <init>() = { super.<init>(); () }; def x = 2; def y = 3 }) +macroPlugin2:enterStat(def <init>() = { super.<init>(); () }) +macroPlugin2:enterStat(def x = 2) +macroPlugin2:enterStat(def y = 3) +macroPlugin1:enterStat(def <init>() = { super.<init>(); () }) +macroPlugin1:enterStat(def x = 2) +macroPlugin1:enterStat(def xmacroPlugin2 = $qmark$qmark$qmark) +macroPlugin1:enterStat(def y = 3) +macroPlugin1:enterStat(def ymacroPlugin2 = $qmark$qmark$qmark) +macroPlugin2:enterStat(super.<init>()) +macroPlugin1:enterStat(super.<init>()) |