File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ import scala .tools .nsc .reporters ._
2
+ import scala .tools .nsc .Settings
3
+ import reflect .runtime .Mirror .ToolBox
4
+
5
+ object Test extends App {
6
+ val code = scala.reflect.Code .lift{
7
+ class C
8
+ new C
9
+ };
10
+
11
+ val reporter = new ConsoleReporter (new Settings )
12
+ val toolbox = new ToolBox (reporter)
13
+ val ttree = toolbox.typeCheck(code.tree)
14
+ toolbox.runExpr(ttree)
15
+ }
Original file line number Diff line number Diff line change
1
+ import scala .tools .nsc .reporters ._
2
+ import scala .tools .nsc .Settings
3
+ import reflect .runtime .Mirror .ToolBox
4
+
5
+ object Test extends App {
6
+ val code = scala.reflect.Code .lift{
7
+ class C
8
+ List ((new C , new C ))
9
+ };
10
+
11
+ val reporter = new ConsoleReporter (new Settings )
12
+ val toolbox = new ToolBox (reporter)
13
+ val ttree = toolbox.typeCheck(code.tree)
14
+ toolbox.runExpr(ttree)
15
+ }
You can’t perform that action at this time.
0 commit comments