From 1ab71ca9b2db9d2219b23837df4c27723773738b Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 20 May 2016 10:24:23 +0200 Subject: Instrument Denotations#current to find CyclicReference Instrument Denotations#current to find CyclicReference errors arising during transforms. --- src/dotty/tools/dotc/core/Denotations.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Denotations.scala') 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 { -- cgit v1.2.3