diff options
author | Martin Odersky <odersky@gmail.com> | 2016-05-20 10:24:23 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-05-23 12:01:39 +0200 |
commit | 1ab71ca9b2db9d2219b23837df4c27723773738b (patch) | |
tree | 2a3139a146084f0222665668b90a0fbf3030e982 /src/dotty | |
parent | df58b455df32dbc6cf98eff2ccea6fc268cf6193 (diff) | |
download | dotty-1ab71ca9b2db9d2219b23837df4c27723773738b.tar.gz dotty-1ab71ca9b2db9d2219b23837df4c27723773738b.tar.bz2 dotty-1ab71ca9b2db9d2219b23837df4c27723773738b.zip |
Instrument Denotations#current to find CyclicReference
Instrument Denotations#current to find CyclicReference errors
arising during transforms.
Diffstat (limited to 'src/dotty')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 080e8a39b..5dfc5c17d 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -656,7 +656,13 @@ object Denotations { var startPid = nextTransformerId + 1 val transformer = ctx.denotTransformers(nextTransformerId) //println(s"transforming $this with $transformer") - next = transformer.transform(cur)(ctx.withPhase(transformer)).syncWithParents + try { + next = transformer.transform(cur)(ctx.withPhase(transformer)).syncWithParents + } catch { + case ex: CyclicReference => + println(s"error while transforming $this") // DEBUG + throw ex + } if (next eq cur) startPid = cur.validFor.firstPhaseId else { |