Skip to content

Commit f8c3993

Browse files
committed
Make DottyTest a Trait
1 parent 14bfa1a commit f8c3993

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/test/dotty/tools/DottyTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import dotc.Compiler
1414

1515
import dotc.core.Phases.Phase
1616

17-
class DottyTest extends ContextEscapeDetection{
17+
trait DottyTest extends ContextEscapeDetection {
1818

1919
dotc.parsing.Scanners // initialize keywords
2020

compiler/test/dotty/tools/DottyTypeStealer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import dotc.core.Contexts.Context
77
import dotc.core.Decorators._
88
import dotc.core.Types.Type
99

10-
object DottyTypeStealer {
10+
object DottyTypeStealer extends DottyTest {
1111
def stealType(source: String, typeStrings: String*): (Context, List[Type]) = {
1212
val dummyName = "x_x_x"
1313
val vals = typeStrings.zipWithIndex.map{case (s, x)=> s"val ${dummyName}$x: $s = ???"}.mkString("\n")
1414
val gatheredSource = s" ${source}\n object A$dummyName {$vals}"
1515
var scontext : Context = null
1616
var tp: List[Type] = null
17-
new DottyTest().checkCompile("frontend",gatheredSource) {
17+
checkCompile("frontend",gatheredSource) {
1818
(tree, context) =>
1919
implicit val ctx = context
2020
val findValDef: (List[ValDef], tpd.Tree) => List[ValDef] =

0 commit comments

Comments
 (0)