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 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 {
72
72
myMacroClassLoader
73
73
}
74
74
75
- override def phaseName : String = " reifyQuotes "
75
+ override def phaseName : String = ReifyQuotes .name
76
76
77
77
override def checkPostCondition (tree : Tree )(implicit ctx : Context ): Unit = {
78
78
tree match {
@@ -607,6 +607,8 @@ class ReifyQuotes extends MacroTransformWithImplicits {
607
607
}
608
608
609
609
object ReifyQuotes {
610
+ val name = " reifyQuotes"
611
+
610
612
def toValue (tree : Tree ): Option [Any ] = tree match {
611
613
case Literal (Constant (c)) => Some (c)
612
614
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._
60
60
import dotty .tools .dotc .core .StdNames ._
61
61
import dotty .tools .dotc .core .Symbols ._
62
62
import dotty .tools .dotc .plugins .{PluginPhase , StandardPlugin }
63
- import dotty .tools .dotc .transform .{LinkAll , Pickler }
63
+ import dotty .tools .dotc .transform .{Pickler , ReifyQuotes }
64
64
65
65
class DivideZero extends StandardPlugin {
66
66
val name : String = " divideZero"
@@ -75,7 +75,7 @@ class DivideZeroPhase extends PluginPhase {
75
75
val phaseName = " divideZero"
76
76
77
77
override val runsAfter = Set (Pickler .name)
78
- override val runsBefore = Set (LinkAll .name)
78
+ override val runsBefore = Set (ReifyQuotes .name)
79
79
80
80
override def transformApply (tree : Apply )(implicit ctx : Context ): Tree = {
81
81
tree match {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import transform.MegaPhase.MiniPhase
10
10
import Decorators ._
11
11
import Symbols .Symbol
12
12
import Constants .Constant
13
- import transform .{LinkAll , Pickler }
13
+ import transform .{Pickler , ReifyQuotes }
14
14
15
15
/** Compiler plugin that emits an error when compiling a division by zero */
16
16
class DivideZero extends PluginPhase with StandardPlugin {
@@ -20,7 +20,7 @@ class DivideZero extends PluginPhase with StandardPlugin {
20
20
val phaseName = name
21
21
22
22
override val runsAfter = Set (Pickler .name)
23
- override val runsBefore = Set (LinkAll .name)
23
+ override val runsBefore = Set (ReifyQuotes .name)
24
24
25
25
def init (options : List [String ]): List [PluginPhase ] = this :: Nil
26
26
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import transform.MegaPhase.MiniPhase
8
8
import Decorators ._
9
9
import Symbols .Symbol
10
10
import Constants .Constant
11
- import transform .{LinkAll , Pickler }
11
+ import transform .{Pickler , ReifyQuotes }
12
12
import StdNames ._
13
13
14
14
class DivideZero extends PluginPhase with StandardPlugin {
@@ -18,7 +18,7 @@ class DivideZero extends PluginPhase with StandardPlugin {
18
18
val phaseName = name
19
19
20
20
override val runsAfter = Set (Pickler .name)
21
- override val runsBefore = Set (LinkAll .name)
21
+ override val runsBefore = Set (ReifyQuotes .name)
22
22
23
23
override def init (options : List [String ]): List [PluginPhase ] = this :: Nil
24
24
You can’t perform that action at this time.
0 commit comments