blob: 2d9397fa6e58dc066b8e820debc4964226466a59 (
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
33
34
35
36
|
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.printing.Texts._
import dotty.tools.dotc.core.Decorators._
import org.junit.Test
class DottyTest {
dotty.tools.dotc.parsing.Scanners // initialize keywords
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(prompt, true)
.withSetting(Ylogcp, true)
.withSetting(printtypes, true)
.withSetting(pageWidth, 90)
.withSetting(log, List("<some"))
// .withSetting(uniqid, true)
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)
}
|