scala/scala — pull request #1292 by jsuereth (2012-09-12 14:48:29+00:00)
Title: 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.

Review by @xeno-by and @paulp