From 1d28fe6c808fb9b257a2a3b24abb911bf7697d2b Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Fri, 9 Aug 2013 14:24:48 +0200 Subject: [nomaster] SI-7733 reflective packages now more consistent with scalac Previously PackageScopes from scala.reflect ignored all classes that had $'s in non-rightmost positions in their names. Unfortunately this behaviour is inconsistent with how scalac does things, and I reconciled this as usual, by pulling corresponding logic into scala-reflect.jar and sharing it between runtime reflection and compiler. This change has seprate pull requests for 2.10.x and 2.11.0. The latter deprecates `scala.tools.nsc.util.ClassPath.isTraitImplementation` whereas the former (which you're looking at right now) does not, because we can't deprecated members in minor releases. --- test/files/run/t7733/Separate_1.scala | 5 +++++ test/files/run/t7733/Test_2.scala | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 test/files/run/t7733/Separate_1.scala create mode 100644 test/files/run/t7733/Test_2.scala (limited to 'test/files/run/t7733') diff --git a/test/files/run/t7733/Separate_1.scala b/test/files/run/t7733/Separate_1.scala new file mode 100644 index 0000000000..a326ecd53e --- /dev/null +++ b/test/files/run/t7733/Separate_1.scala @@ -0,0 +1,5 @@ +package test + +class Separate { + for (i <- 1 to 10) println(i) +} \ No newline at end of file diff --git a/test/files/run/t7733/Test_2.scala b/test/files/run/t7733/Test_2.scala new file mode 100644 index 0000000000..28358574ec --- /dev/null +++ b/test/files/run/t7733/Test_2.scala @@ -0,0 +1,9 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +object Test extends App { + val tb = cm.mkToolBox() + val code = tb.parse("{ val x: test.Separate$$anonfun$1 = null; x }") + println(tb.eval(code)) +} \ No newline at end of file -- cgit v1.2.3