File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
compiler/test/dotty/tools Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import dotc.Compiler
14
14
15
15
import dotc .core .Phases .Phase
16
16
17
- class DottyTest extends ContextEscapeDetection {
17
+ trait DottyTest extends ContextEscapeDetection {
18
18
19
19
dotc.parsing.Scanners // initialize keywords
20
20
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ import dotc.core.Contexts.Context
7
7
import dotc .core .Decorators ._
8
8
import dotc .core .Types .Type
9
9
10
- object DottyTypeStealer {
10
+ object DottyTypeStealer extends DottyTest {
11
11
def stealType (source : String , typeStrings : String * ): (Context , List [Type ]) = {
12
12
val dummyName = " x_x_x"
13
13
val vals = typeStrings.zipWithIndex.map{case (s, x)=> s " val ${dummyName}$x: $s = ??? " }.mkString(" \n " )
14
14
val gatheredSource = s " ${source}\n object A $dummyName { $vals} "
15
15
var scontext : Context = null
16
16
var tp : List [Type ] = null
17
- new DottyTest (). checkCompile(" frontend" ,gatheredSource) {
17
+ checkCompile(" frontend" ,gatheredSource) {
18
18
(tree, context) =>
19
19
implicit val ctx = context
20
20
val findValDef : (List [ValDef ], tpd.Tree ) => List [ValDef ] =
You can’t perform that action at this time.
0 commit comments