File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import Denotations._, SymDenotations._
15
15
import dotty .tools .dotc .ast .tpd
16
16
import TypeErasure .erasure
17
17
import DenotTransformers ._
18
- import dotty .tools .backend .jvm .DottyBackendInterface .requiredClass
19
18
20
19
object ElimRepeated {
21
20
val name : String = " elimRepeated"
@@ -27,6 +26,9 @@ object ElimRepeated {
27
26
class ElimRepeated extends MiniPhase with InfoTransformer { thisPhase =>
28
27
import ast .tpd ._
29
28
29
+ private val varargsAnnot = new CtxLazy (
30
+ summon[Context ].requiredClass(" scala.annotation.varargs" ))
31
+
30
32
override def phaseName : String = ElimRepeated .name
31
33
32
34
override def changesMembers : Boolean = true // the phase adds vararg bridges
@@ -48,7 +50,7 @@ class ElimRepeated extends MiniPhase with InfoTransformer { thisPhase =>
48
50
49
51
private def overridesJava (sym : Symbol )(implicit ctx : Context ) = sym.allOverriddenSymbols.exists(_.is(JavaDefined ))
50
52
51
- private def hasVargsAnnotation (sym : Symbol )(using ctx : Context ) = sym.hasAnnotation(requiredClass[scala.annotation.varargs] )
53
+ private def hasVargsAnnotation (sym : Symbol )(using ctx : Context ) = sym.hasAnnotation(varargsAnnot() )
52
54
53
55
private def elimRepeated (tp : Type )(implicit ctx : Context ): Type = tp.stripTypeVar match {
54
56
case tp @ MethodTpe (paramNames, paramTypes, resultType) =>
You can’t perform that action at this time.
0 commit comments