aboutsummaryrefslogtreecommitdiff
path: root/LICENSE.md
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2016-12-19 13:25:28 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2016-12-19 13:25:28 +0100
commita5363c4e08d01c32501036af6aeeb8a6c07e0d3b (patch)
treec33590930e3cf4d52354dc9afa460ad7e659db46 /LICENSE.md
parent3ea7b994208bec886b5fb464e4da91550a3d8582 (diff)
downloaddotty-a5363c4e08d01c32501036af6aeeb8a6c07e0d3b.tar.gz
dotty-a5363c4e08d01c32501036af6aeeb8a6c07e0d3b.tar.bz2
dotty-a5363c4e08d01c32501036af6aeeb8a6c07e0d3b.zip
Fix #1812, Symbols.mapSymbols shouldn't replace denotations
It will use lazy types instead. The current version transforms a type, with a context that has denotations that may be forcefully replaced by mapSymbols. Types created during this transformation may cache denots, that are-to-be replaced. This is very problematic as this method is called from TreeTypeMap.withMappedSyms in a fixed-point cycle, creating new symbols on every iteration. Those cached denotations could make types keep symbols from previous iterations indefinitely. The changed version does not transform the types eagerly, and instead makes them lazy. Assuming there are no cycles, this should ensure correct ordering. Unfortunatelly, at this point in the compiler we basically always touch everything, and we can't even transform the info of denotation without this denotations info. We basically have a chicked&egg problem here. To solve it, I use the same trick as used by other lazy types by assigning an approximation of future type first. This allows to pass the tests and makes dotty more robust, but I suspect this isn't a complete fix and new similar bugs may arrive.
Diffstat (limited to 'LICENSE.md')
0 files changed, 0 insertions, 0 deletions