summaryrefslogtreecommitdiff
path: root/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala')
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala13
1 files changed, 3 insertions, 10 deletions
diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala
index 7ed0e13226..ab1aef47cd 100644
--- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala
+++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala
@@ -16,19 +16,12 @@ import scala.tools.partest.ASMConverters
import ASMConverters._
import AsmUtils._
-import scala.collection.convert.decorateAsScala._
+import scala.collection.JavaConverters._
import scala.tools.testing.ClearAfterClass
-object InlinerIllegalAccessTest extends ClearAfterClass.Clearable {
- var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none")
- def clear(): Unit = { compiler = null }
-}
-
@RunWith(classOf[JUnit4])
class InlinerIllegalAccessTest extends ClearAfterClass {
- ClearAfterClass.stateToClear = InlinerIllegalAccessTest
-
- val compiler = InlinerIllegalAccessTest.compiler
+ val compiler = cached("compiler", () => newCompiler(extraArgs = "-Yopt:l:none"))
import compiler.genBCode.bTypes._
def addToRepo(cls: List[ClassNode]): Unit = for (c <- cls) byteCodeRepository.add(c, ByteCodeRepository.Classfile)
@@ -67,7 +60,7 @@ class InlinerIllegalAccessTest extends ClearAfterClass {
check(dClass, assertEmpty)
check(eClass, assertEmpty) // C is public, so accessible in E
- byteCodeRepository.classes.clear()
+ byteCodeRepository.parsedClasses.clear()
classBTypeFromInternalName.clear()
cClass.access &= ~ACC_PUBLIC // ftw