diff options
author | Martin Odersky <odersky@gmail.com> | 2008-03-17 17:06:47 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-03-17 17:06:47 +0000 |
commit | 647c6d8d3cc5673b4d5c7656587842ed99521d34 (patch) | |
tree | bdb6bdc7ac436e199f1219bed8502822fb731558 | |
parent | c32ee91e83332fbfdeb32e03f73860eafff89cd6 (diff) | |
download | scala-647c6d8d3cc5673b4d5c7656587842ed99521d34.tar.gz scala-647c6d8d3cc5673b4d5c7656587842ed99521d34.tar.bz2 scala-647c6d8d3cc5673b4d5c7656587842ed99521d34.zip |
added better disgniostics for cyclic references
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Symbols.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index 2a928f2e4f..5d34fb12be 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -473,7 +473,7 @@ trait Symbols { /** Get type info associated with symbol at current phase, after * ensuring that symbol is initialized (i.e. type is completed). */ - def info: Type = { + def info: Type = try { var cnt = 0 while (validTo == NoPeriod) { //if (settings.debug.value) System.out.println("completing " + this);//DEBUG @@ -502,6 +502,10 @@ trait Symbols { } val result = rawInfo result + } catch { + case ex: CyclicReference => + if (settings.debug.value) println("... trying to complete "+this) + throw ex } /** Set initial info. */ |