blob: b5793a7eb58634063d891f983295a9044dcaeba0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package test
import dotty.tools.dotc.core._
import dotty.tools.dotc.core.Contexts._
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.core.Flags._
import Types._, Symbols._, Decorators._
import dotty.tools.dotc.util.Texts._
import dotty.tools.dotc.core.Decorators._
import org.junit.Test
class DottyTest {
implicit val ctx: Context = {
val base = Context.theBase
import base.settings._
val ctx = base.initialCtx.fresh
.withSetting(verbose, true)
.withSetting(debug, true)
.withSetting(debugTrace, true)
.withSetting(Ylogcp, true)
.withSetting(printtypes, true)
.withSetting(pageWidth, 90)
.withSetting(log, List("<some"))
println(ctx.settings)
base.definitions.init()
ctx
}
def methType(names: String*)(paramTypes: Type*)(resultType: Type = defn.UnitType) =
MethodType(names.toList map (_.toTermName), paramTypes.toList, resultType)
}
|