aboutsummaryrefslogtreecommitdiff
path: root/compiler/test
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-02-10 15:34:33 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-02-10 15:34:33 +0100
commitf8c3993ca6e78edf2f9bf5842bce78c028578081 (patch)
tree290f97ff16d0ff8a276a29ea43d9a2d9c48735f2 /compiler/test
parent14bfa1ab9a7ce95e99f44449b56f52ec4b6439e0 (diff)
downloaddotty-f8c3993ca6e78edf2f9bf5842bce78c028578081.tar.gz
dotty-f8c3993ca6e78edf2f9bf5842bce78c028578081.tar.bz2
dotty-f8c3993ca6e78edf2f9bf5842bce78c028578081.zip
Make DottyTest a Trait
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] =