scala/scala — pull request #1389 by hubertp (2012-09-25 08:51:02+00:00)
Title: Closes SI-6358. Move accessor generation for lazy vals to typers.

Until now lazy accessors were handled somehow special because their symbol was created in typers but the corresponding tree was only added in Refchecks. This irregularity caused serious problems for value classes. Also it now looks just better when lazy value is treated in a similar way as other fields.

I needed to adapt reifier so that it handles the new implementation correctly. Previously it had to recreate lazy val only by removing defdef and renaming. Now we basically need to recreate lazy val from scratch.

There is one minor change to cps plugin but that is still fine because lazy vals were never really part of the transformation.

Review by @odersky and @xeno-by