From ebc23ad054787d87b18b713f26847ee1443d6890 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 26 Mar 2013 16:20:53 +0100 Subject: Some more fixes of classfile reading. --- src/dotty/tools/dotc/core/Definitions.scala | 2 +- src/dotty/tools/dotc/core/Printers.scala | 6 +++--- src/dotty/tools/dotc/core/SymDenotations.scala | 2 +- src/dotty/tools/dotc/core/Types.scala | 8 +++++--- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src/dotty/tools') diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index 81cdf4826..a94359b97 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -45,7 +45,7 @@ class Definitions(implicit ctx: Context) { private def mkArityArray(name: String, arity: Int, countFrom: Int): Array[ClassSymbol] = { val arr = new Array[ClassSymbol](arity) - for (i <- countFrom to arity) arr(i) = requiredClass("scala." + name + i) + for (i <- countFrom until arity) arr(i) = requiredClass("scala." + name + i) arr } diff --git a/src/dotty/tools/dotc/core/Printers.scala b/src/dotty/tools/dotc/core/Printers.scala index e789e7db1..6e63eec3a 100644 --- a/src/dotty/tools/dotc/core/Printers.scala +++ b/src/dotty/tools/dotc/core/Printers.scala @@ -96,9 +96,9 @@ object Printers { try { ctx.toTextRecursions += 1 op - } catch { - case ex: CyclicReference => - s"" +// } catch { +// case ex: CyclicReference => +// s"" } finally { ctx.toTextRecursions -= 1 } diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index fc702b85e..106bb1ca6 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -171,7 +171,7 @@ object SymDenotations { /** The name with which the denoting symbol was created */ final def originalName = - if (flags is ExpandedName) initial.asSymDenotation.name else name + if (this is ExpandedName) initial.asSymDenotation.name else name /** The encoded full path name of this denotation, where outer names and inner names * are separated by `separator` characters. diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 35225e8e7..c1a84604f 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -634,9 +634,11 @@ object Types { if (buf == null) null else { if (tparams == null) tparams = tycon.typeParams - val tparam = tparams(buf.size) - if (name == tparam.name) buf += tp.refinedInfo.argType(tparam) - else null + if (buf.size < tparams.length) { + val tparam = tparams(buf.size) + if (name == tparam.name) buf += tp.refinedInfo.argType(tparam) + else null + } else null } case _ => if (refineCount == 0) null -- cgit v1.2.3