aboutsummaryrefslogtreecommitdiff
path: root/compiler/test
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/test')
-rw-r--r--compiler/test/dotty/tools/DottyTest.scala2
-rw-r--r--compiler/test/dotty/tools/DottyTypeStealer.scala4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/test/dotty/tools/DottyTest.scala b/compiler/test/dotty/tools/DottyTest.scala
index bd6b1cfa4..39ff014c8 100644
--- a/compiler/test/dotty/tools/DottyTest.scala
+++ b/compiler/test/dotty/tools/DottyTest.scala
@@ -14,7 +14,7 @@ import dotc.Compiler
import dotc.core.Phases.Phase
-class DottyTest extends ContextEscapeDetection{
+trait DottyTest extends ContextEscapeDetection {
dotc.parsing.Scanners // initialize keywords
diff --git a/compiler/test/dotty/tools/DottyTypeStealer.scala b/compiler/test/dotty/tools/DottyTypeStealer.scala
index 819f19d25..ff6e67e41 100644
--- a/compiler/test/dotty/tools/DottyTypeStealer.scala
+++ b/compiler/test/dotty/tools/DottyTypeStealer.scala
@@ -7,14 +7,14 @@ import dotc.core.Contexts.Context
import dotc.core.Decorators._
import dotc.core.Types.Type
-object DottyTypeStealer {
+object DottyTypeStealer extends DottyTest {
def stealType(source: String, typeStrings: String*): (Context, List[Type]) = {
val dummyName = "x_x_x"
val vals = typeStrings.zipWithIndex.map{case (s, x)=> s"val ${dummyName}$x: $s = ???"}.mkString("\n")
val gatheredSource = s" ${source}\n object A$dummyName {$vals}"
var scontext : Context = null
var tp: List[Type] = null
- new DottyTest().checkCompile("frontend",gatheredSource) {
+ checkCompile("frontend",gatheredSource) {
(tree, context) =>
implicit val ctx = context
val findValDef: (List[ValDef], tpd.Tree) => List[ValDef] =