Skip to content

Commit eb3b0ac

Browse files
Merge pull request #9422 from dotty-staging/fix-sbt-ctx
Fix sbt scripted tests after refactor in #9343
2 parents 5f73987 + 0d3c674 commit eb3b0ac

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

sbt-dotty/sbt-test/sbt-dotty/analyzer-plugin/plugin/Analyzer.scala

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import scala.language.implicitConversions
44

55
import dotty.tools.dotc._
66
import core._
7+
import Symbols._
78
import Contexts.Context
89
import plugins._
910
import Phases.Phase
@@ -45,8 +46,8 @@ class InitChecker extends PluginPhase {
4546
private def checkRef(tree: Tree)(implicit ctx: Context): Tree =
4647
if (!checkable(tree.symbol)) tree
4748
else {
48-
val helloPkgSym = ctx.requiredPackage("hello").moduleClass
49-
val libPkgSym = ctx.requiredPackage("lib").moduleClass
49+
val helloPkgSym = requiredPackage("hello").moduleClass
50+
val libPkgSym = requiredPackage("lib").moduleClass
5051
val enclosingPkg = tree.symbol.enclosingPackageClass
5152

5253
if (enclosingPkg == helloPkgSym) { // source code

sbt-dotty/sbt-test/sbt-dotty/compiler-plugin/plugin/DivideZero.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Phases.Phase
88
import ast.tpd
99
import transform.MegaPhase.MiniPhase
1010
import Decorators._
11-
import Symbols.Symbol
11+
import Symbols._
1212
import Constants.Constant
1313
import transform.{Pickler, Staging}
1414

@@ -26,7 +26,7 @@ class DivideZero extends PluginPhase with StandardPlugin {
2626

2727
private def isNumericDivide(sym: Symbol)(implicit ctx: Context): Boolean = {
2828
def test(tpe: String): Boolean =
29-
(sym.owner eq ctx.requiredClass(tpe)) && sym.name.show == "/"
29+
(sym.owner eq requiredClass(tpe)) && sym.name.show == "/"
3030

3131
test("scala.Int") || test("scala.Long") || test("scala.Short") || test("scala.Float") || test("scala.Double")
3232
}
@@ -38,4 +38,4 @@ class DivideZero extends PluginPhase with StandardPlugin {
3838
case _ =>
3939
tree
4040
}
41-
}
41+
}

0 commit comments

Comments
 (0)