File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import dotty.tools.dotc.core.{Flags, Definitions}
9
9
import dotty .tools .dotc .core .Symbols .Symbol
10
10
import dotty .tools .dotc .core .Types .{TermRef , Type }
11
11
import dotty .tools .dotc .transform .TreeTransforms .{TransformerInfo , MiniPhaseTransform }
12
+ import dotty .tools .dotc .core .Decorators ._
12
13
13
14
/**
14
15
* This phase retrieves all `@specialized` anotations before they are thrown away,
@@ -19,7 +20,7 @@ class PreSpecializer extends MiniPhaseTransform {
19
20
override def phaseName : String = " prespecialize"
20
21
21
22
private final def primitiveCompanionToPrimitive (companion : Type )(implicit ctx : Context ) = {
22
- if (companion.asInstanceOf [ TermRef ].name.toString == " AnyRef" ) { // Handles `@specialized(AnyRef)` cases
23
+ if (companion.termSymbol eq ctx.requiredModule( " scala.package " ).info.member( " AnyRef" .toTermName).symbol ) { // Handles `@specialized(AnyRef)` cases
23
24
defn.AnyRefType
24
25
}
25
26
else {
@@ -53,7 +54,7 @@ class PreSpecializer extends MiniPhaseTransform {
53
54
}
54
55
55
56
if (allowedToSpecialize(sym)) {
56
- val annotation = sym.denot.getAnnotation(defn.specializedAnnot ).getOrElse(Nil )
57
+ val annotation = sym.denot.getAnnotation(defn.SpecializedAnnot ).getOrElse(Nil )
57
58
annotation match {
58
59
case annot : Annotation =>
59
60
val args = annot.arguments
You can’t perform that action at this time.
0 commit comments