diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-06-27 17:10:47 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-07-09 15:09:38 +0200 |
commit | e72ae708ed39ad006ef7dbbb85e116a8e6704663 (patch) | |
tree | efe31be83f23f421a00b95c1c39e681ae2a3715b /src/reflect | |
parent | 55decf733eb361c235ef1bd9039e5c6226202a96 (diff) | |
download | scala-e72ae708ed39ad006ef7dbbb85e116a8e6704663.tar.gz scala-e72ae708ed39ad006ef7dbbb85e116a8e6704663.tar.bz2 scala-e72ae708ed39ad006ef7dbbb85e116a8e6704663.zip |
SI-7617 typedAssign no longer expands lhs
This makes sure that setter and updateDynamic macros work as intended
rather than in some cases expanding incorrectly or prematurely.
Setter invocations are desugared from assignments of values to getters.
If a typecheck of an assignment's lhs yields an invocation of a getter,
then the assignment is rewritten into an invocation of a setter. However
if a getter is a macro, then it just expands, destroying the prerequisite
for desugaring. Therefore we need to disable expansion for the typecheck
of an lhs.
Similar thing happens to updateDynamic that first desugars a getter
invocation into q"$target.updateDynamic($fieldName)" and then expects
typedAssign to rewrite the corresponding Assign node into an additional
application of a partially applied updateDynamic to a rhs. Here we also
need to disable the typecheck of an lhs, because macros cannot be
partially applied.
Diffstat (limited to 'src/reflect')
0 files changed, 0 insertions, 0 deletions