scala/scala — pull request #3120 by som-snytt (2013-11-11 00:59:26+00:00)
Title: SI-7747 Support class based wrappers in REPL

This is @ScrapCodes proposal with simplifications.

The original commits are squashed and pass tests.

The simplification removes changes to the typical `$read.$iw.$iw.value` paths. The same name (`$read` or `$iw`) is used for both the type of the wrapper and the value term at each level of nesting. So the path looks the same for both templates.

The same command option (`-Yrepl-class-based`) is used to pick one of two `Wrapper` subtypes. `Wrapper` is just a `CodeAssembler`. The wrapper is also passed to the imports wrapping code.

Review by @retronym who looked at the previous PR.