diff options
author | Adriaan Moors <adriaan@lightbend.com> | 2016-09-08 18:17:45 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-09-26 15:46:21 -0700 |
commit | 9a39e0c283ac60edabb8dba9ad8513199112882a (patch) | |
tree | b261ffcd79d1adb9e01d727d70fb3eff8d2183e1 /README.md | |
parent | 6df14e57a4980897d5517f002c04584b82e05b15 (diff) | |
download | scala-9a39e0c283ac60edabb8dba9ad8513199112882a.tar.gz scala-9a39e0c283ac60edabb8dba9ad8513199112882a.tar.bz2 scala-9a39e0c283ac60edabb8dba9ad8513199112882a.zip |
Avoid mismatched symbols in fields phase
The info of the var that stores a trait's lazy val's computed value
is expressed in terms of symbols that exist before the fields phase.
When we're implementing the lazy val in a subclass of that trait,
we now see symbols created by the fields phase, which results
in mismatches between the types of the lhs and rhs in the assignment
of `lazyVar = super.lazyImpl`.
So, type check the super-call to the trait's lazy accessor before our
own phase. If the lazy var's info depends on a val that is now
implemented by an accessor synthesize by our info transformer,
we'll get a mismatch when assigning `rhs` to `lazyVarOf(getter)`,
unless we also run before our own phase (like when we were
creating the info for the lazy var).
This was revealed by Hanns Holger Rutz's efforts in compiling
scala-refactoring's test suite (reported on scala-internals).
Fixes scala/scala-dev#219
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions