File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
compiler/src/dotty/tools/dotc/transform
docs/docs/reference/changed
sbt-dotty/sbt-test/sbt-dotty/compiler-plugin/plugin
tests/plugins/neg/divideZero Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class ReifyQuotes extends MacroTransformWithImplicits {
7272 myMacroClassLoader
7373 }
7474
75- override def phaseName : String = " reifyQuotes "
75+ override def phaseName : String = ReifyQuotes .name
7676
7777 override def checkPostCondition (tree : Tree )(implicit ctx : Context ): Unit = {
7878 tree match {
@@ -607,6 +607,8 @@ class ReifyQuotes extends MacroTransformWithImplicits {
607607}
608608
609609object ReifyQuotes {
610+ val name = " reifyQuotes"
611+
610612 def toValue (tree : Tree ): Option [Any ] = tree match {
611613 case Literal (Constant (c)) => Some (c)
612614 case Block (Nil , e) => toValue(e)
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ import dotty.tools.dotc.core.Decorators._
6060import dotty .tools .dotc .core .StdNames ._
6161import dotty .tools .dotc .core .Symbols ._
6262import dotty .tools .dotc .plugins .{PluginPhase , StandardPlugin }
63- import dotty .tools .dotc .transform .{LinkAll , Pickler }
63+ import dotty .tools .dotc .transform .{Pickler , ReifyQuotes }
6464
6565class DivideZero extends StandardPlugin {
6666 val name : String = " divideZero"
@@ -75,7 +75,7 @@ class DivideZeroPhase extends PluginPhase {
7575 val phaseName = " divideZero"
7676
7777 override val runsAfter = Set (Pickler .name)
78- override val runsBefore = Set (LinkAll .name)
78+ override val runsBefore = Set (ReifyQuotes .name)
7979
8080 override def transformApply (tree : Apply )(implicit ctx : Context ): Tree = {
8181 tree match {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import transform.MegaPhase.MiniPhase
1010import Decorators ._
1111import Symbols .Symbol
1212import Constants .Constant
13- import transform .{LinkAll , Pickler }
13+ import transform .{Pickler , ReifyQuotes }
1414
1515/** Compiler plugin that emits an error when compiling a division by zero */
1616class DivideZero extends PluginPhase with StandardPlugin {
@@ -20,7 +20,7 @@ class DivideZero extends PluginPhase with StandardPlugin {
2020 val phaseName = name
2121
2222 override val runsAfter = Set (Pickler .name)
23- override val runsBefore = Set (LinkAll .name)
23+ override val runsBefore = Set (ReifyQuotes .name)
2424
2525 def init (options : List [String ]): List [PluginPhase ] = this :: Nil
2626
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import transform.MegaPhase.MiniPhase
88import Decorators ._
99import Symbols .Symbol
1010import Constants .Constant
11- import transform .{LinkAll , Pickler }
11+ import transform .{Pickler , ReifyQuotes }
1212import StdNames ._
1313
1414class DivideZero extends PluginPhase with StandardPlugin {
@@ -18,7 +18,7 @@ class DivideZero extends PluginPhase with StandardPlugin {
1818 val phaseName = name
1919
2020 override val runsAfter = Set (Pickler .name)
21- override val runsBefore = Set (LinkAll .name)
21+ override val runsBefore = Set (ReifyQuotes .name)
2222
2323 override def init (options : List [String ]): List [PluginPhase ] = this :: Nil
2424
You can’t perform that action at this time.
0 commit comments