This trait assembles what's needed for synthesizing derived methods.
This trait assembles what's needed for synthesizing derived methods. Important: Typically, instances of this trait are created TWICE for each derived symbol; once form Namers in an enter method, and once from Typers in addDerivedTrees. So it's important that creating an instance of Derived does not have a side effect, or if it has a side effect, control that it is done only once.
A synthetic method which performs the implicit conversion implied by the declaration of an implicit class.
Implements lazy value accessors:
Implements lazy value accessors:
There are two key methods in here.
1) Enter methods such as enterGetterSetter are called from Namer with a tree which may generate further trees such as accessors or implicit wrappers. Some setup is performed. In general this creates symbols and enters them into the scope of the owner.
2) addDerivedTrees is called from Typer when a Template is typed. It completes the job, returning a list of trees with their symbols set to those created in the enter methods. Those trees then become part of the typed template.