scala/scala — pull request #3233 by scottcarey (2013-12-07 02:48:37+00:00)
Title: SI-8042 Use Serialization Proxy Pattern in List

In order for List to be truly Immutable, it must not mutate member
variables for deserialization. The Serialization Proxy Pattern
allows a proxy object to manage the serialization such that the
original object can remain immutable.

This change modifies List to use a serialization proxy instead of
directly mutating its own state, which one of its to member
values to change from var to val immediately. The other member,
tl, is mutated by ListBuffer and in the reflection code and can
not yet become a val.