diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-09-21 14:10:33 +0200 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-10-18 09:43:16 +0200 |
commit | 4c86dbbc49266684f66b8731d998b5a3ed508f21 (patch) | |
tree | 606db3f2db4c901b752878e89a1504428ce925e9 /test/files/pos/t1035.scala | |
parent | 87c5895d4bae62f1b5bacbd145f2e0fddcccf423 (diff) | |
download | scala-4c86dbbc49266684f66b8731d998b5a3ed508f21.tar.gz scala-4c86dbbc49266684f66b8731d998b5a3ed508f21.tar.bz2 scala-4c86dbbc49266684f66b8731d998b5a3ed508f21.zip |
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.
Some range positions needed to be fixed manually. We could do it at the creation time but that would require a lot more "if (symbol.isLazy)" conditions for MethodSyntheis and Symbol/Tree creation and would just unnecessary complicate api. If someone has a better idea, please speak up. Range positions changes were necessary because previously accessors were created at refchecks and they weren't checked by validator (even though they were wrong).
This commit removes lazy val implementation restriction introduced for 2.10.0.
(cherry-picked from 981424b)
Diffstat (limited to 'test/files/pos/t1035.scala')
0 files changed, 0 insertions, 0 deletions