diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/toolbox_rangepos.check | 1 | ||||
-rw-r--r-- | test/files/run/toolbox_rangepos.scala | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/toolbox_rangepos.check b/test/files/run/toolbox_rangepos.check new file mode 100644 index 0000000000..b536d3fde1 --- /dev/null +++ b/test/files/run/toolbox_rangepos.check @@ -0,0 +1 @@ +RangePosition(<toolbox>, 0, 2, 5) diff --git a/test/files/run/toolbox_rangepos.scala b/test/files/run/toolbox_rangepos.scala new file mode 100644 index 0000000000..41fe6daa03 --- /dev/null +++ b/test/files/run/toolbox_rangepos.scala @@ -0,0 +1,8 @@ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val toolbox = cm.mkToolBox(options = "-Yrangepos") + val tree = toolbox.parse("2 + 2") + println(tree.pos) +} |