@@ -7,19 +7,19 @@ import dotty.tools.dotc.transform.MegaPhase.MiniPhase
77import dotty .tools .dotc .core .Contexts .*
88import dotty .tools .dotc .core .StdNames .nme
99import dotty .tools .dotc .report
10- import dotty .tools .dotc .reporting .*
11- import dotty .tools .dotc .util .SourcePosition
1210
1311
1412class CheckDollarInIdentifier extends MiniPhase :
1513 import CheckDollarInIdentifier .ShouldNotContainDollarSignError
1614
17- override def phaseName : String = CheckUnused .phaseNamePrefix
15+ override def phaseName : String = CheckDollarInIdentifier .phaseName
1816
19- override def description : String = CheckUnused .description
17+ override def description : String = CheckDollarInIdentifier .description
2018
2119 override def isRunnable (using Context ): Boolean =
22- super .isRunnable && ctx.settings.WdollarCheck .value
20+ super .isRunnable &&
21+ ctx.settings.WdollarCheck .value &&
22+ ! ctx.isJava
2323
2424 override def transformValDef (tree : tpd.ValDef )(using Context ): tpd.Tree =
2525 reportDollarInIdentifier(tree)
@@ -81,7 +81,7 @@ class CheckDollarInIdentifier extends MiniPhase:
8181
8282
8383object CheckDollarInIdentifier :
84- val name : String = " dollarWarn "
84+ val phaseName : String = " checkDollarInIdentifier "
8585 val description : String = " warns if identifiers contain dollar sign, $"
8686
8787 private val ShouldNotContainDollarSignError = s " identifiers should not include dollar sign "
0 commit comments