diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-11-21 13:07:52 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-12-06 22:52:44 +0100 |
commit | 5546a72f35e1301d38e3fd56873db7a1fc5163bb (patch) | |
tree | 99123c65049c323d9ee520eaf06e5fbc984d559e /test/files/run/toolbox_typecheck_implicitsdisabled.scala | |
parent | 58969850a0991a72c360433540943eae4b10dc6b (diff) | |
download | scala-5546a72f35e1301d38e3fd56873db7a1fc5163bb.tar.gz scala-5546a72f35e1301d38e3fd56873db7a1fc5163bb.tar.bz2 scala-5546a72f35e1301d38e3fd56873db7a1fc5163bb.zip |
SI-6696 removes "helper" tree factory methods
As experience shows, these methods can easily be a source of confusion
for the newcomers: https://issues.scala-lang.org/browse/SI-6696.
I'm only leaving the TypeTree(tp) factory, since the facility to
set underlying types for type trees is not exposed in the public API,
as it's inherently mutable.
Diffstat (limited to 'test/files/run/toolbox_typecheck_implicitsdisabled.scala')
-rw-r--r-- | test/files/run/toolbox_typecheck_implicitsdisabled.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/run/toolbox_typecheck_implicitsdisabled.scala b/test/files/run/toolbox_typecheck_implicitsdisabled.scala index f11f0192f3..8a3d433142 100644 --- a/test/files/run/toolbox_typecheck_implicitsdisabled.scala +++ b/test/files/run/toolbox_typecheck_implicitsdisabled.scala @@ -6,16 +6,16 @@ import scala.tools.reflect.ToolBox object Test extends App { val toolbox = cm.mkToolBox() - val tree1 = Block( - Import(Select(Ident(newTermName("scala")), newTermName("Predef")), List(ImportSelector(nme.WILDCARD, -1, null, -1))), + val tree1 = Block(List( + Import(Select(Ident(newTermName("scala")), newTermName("Predef")), List(ImportSelector(nme.WILDCARD, -1, null, -1)))), Apply(Select(Literal(Constant(1)), newTermName("$minus$greater")), List(Literal(Constant(2)))) ) val ttree1 = toolbox.typeCheck(tree1, withImplicitViewsDisabled = false) println(ttree1) try { - val tree2 = Block( - Import(Select(Ident(newTermName("scala")), newTermName("Predef")), List(ImportSelector(nme.WILDCARD, -1, null, -1))), + val tree2 = Block(List( + Import(Select(Ident(newTermName("scala")), newTermName("Predef")), List(ImportSelector(nme.WILDCARD, -1, null, -1)))), Apply(Select(Literal(Constant(1)), newTermName("$minus$greater")), List(Literal(Constant(2)))) ) val ttree2 = toolbox.typeCheck(tree2, withImplicitViewsDisabled = true) |