From 7861ed6886ecf827907a6b48f0628395f199f49b Mon Sep 17 00:00:00 2001 From: Josh Suereth Date: Wed, 12 Sep 2012 10:46:45 -0400 Subject: Fixes SI-6259. Unable to use typeOf in super call of top-level object. This works around the issue of the inability to use classOf for top-level object classes by inventing a new anonymous class and instantiating it just to grab its class. Since the class is a nested type of the top-level object it'll be in the same classloader unless some kind of evil behavior is afoot. This patch should be undone if ever SI-2453 ever gets fixed, or we wind up with a direct way to grab the class of an object. --- test/files/run/toolbox_typecheck_macrosdisabled2.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/files/run/toolbox_typecheck_macrosdisabled2.scala') diff --git a/test/files/run/toolbox_typecheck_macrosdisabled2.scala b/test/files/run/toolbox_typecheck_macrosdisabled2.scala index 51493ffc1c..462dc9fa91 100644 --- a/test/files/run/toolbox_typecheck_macrosdisabled2.scala +++ b/test/files/run/toolbox_typecheck_macrosdisabled2.scala @@ -3,6 +3,10 @@ import scala.reflect.runtime.{universe => ru} import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.ToolBox +// Note: If you're looking at this test and you don't know why, you may +// have accidentally changed the way type tags reify. If so, validate +// that your changes are accurate and update the check file. + object Test extends App { val toolbox = cm.mkToolBox() val rupkg = cm.staticModule("scala.reflect.runtime.package") -- cgit v1.2.3