summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-04 11:11:16 +0000
committerPaul Phillips <paulp@improving.org>2011-03-04 11:11:16 +0000
commit6055b574032a9f86f8d601d6a4c92f517041ebaa (patch)
tree486efbafd67dad53758b343071c5e3ef14485278
parentdb62da7582be751d9930eea81c8ef6fddc435184 (diff)
downloadscala-6055b574032a9f86f8d601d6a4c92f517041ebaa.tar.gz
scala-6055b574032a9f86f8d601d6a4c92f517041ebaa.tar.bz2
scala-6055b574032a9f86f8d601d6a4c92f517041ebaa.zip
Reverting some recent signature code and tempor...
Reverting some recent signature code and temporarily disabling a test so I can work this out without shattering the tranquility of the build. No review.
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala12
-rw-r--r--test/disabled/jvm/t2585.check (renamed from test/files/jvm/t2585.check)0
-rw-r--r--test/disabled/jvm/t2585/Test.java (renamed from test/files/jvm/t2585/Test.java)0
-rw-r--r--test/disabled/jvm/t2585/genericouter.scala (renamed from test/files/jvm/t2585/genericouter.scala)0
5 files changed, 7 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
index 27eed6d577..e6b2c1e450 100644
--- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -607,10 +607,6 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable =>
}
def ownerChain: List[Symbol] = this :: owner.ownerChain
- def enclClassChain: List[Symbol] =
- if (this eq NoSymbol) Nil
- else if (isClass) this :: owner.enclClassChain
- else owner.enclClassChain
def ownersIterator: Iterator[Symbol] = new Iterator[Symbol] {
private var current = Symbol.this
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index 096b646587..29715ae6fa 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -205,10 +205,10 @@ abstract class Erasure extends AddInterfaces
// * higher-order type parameters (aka !sym.owner.isTypeParameterOrSkolem)
// * parameters of methods
// * type members not visible in the enclosing template
- private def isTypeParameterInSig(sym: Symbol, enclosing: List[Symbol]) = (
+ private def isTypeParameterInSig(sym: Symbol, nestedIn: Symbol) = (
!sym.owner.isTypeParameterOrSkolem &&
sym.isTypeParameterOrSkolem &&
- (enclosing exists (sym isNestedIn _))
+ (sym isNestedIn nestedIn)
)
// Ensure every '.' in the generated signature immediately follows
// a close angle bracket '>'. Any which do not are replaced with '$'.
@@ -242,8 +242,9 @@ abstract class Erasure extends AddInterfaces
case tp => tp :: Nil
}) map squashBoxed
- def jsig2(toplevel: Boolean, tparams: List[Symbol], tp0: Type): String = traceSig("jsig2", toplevel, tparams, tp0) {
+ def jsig2(toplevel: Boolean, tparams: List[Symbol], tp0: Type): String = {
val tp = tp0.dealias
+ traceSig("jsig2", toplevel, tparams, tp0 + " -> " + tp + " / " + tp.getClass) {
tp match {
case st: SubType =>
jsig2(toplevel, tparams, st.supertype)
@@ -274,7 +275,7 @@ abstract class Erasure extends AddInterfaces
if (unboundedGenericArrayLevel(tp) == 1) jsig(ObjectClass.tpe)
else ARRAY_TAG.toString+(args map jsig).mkString
}
- else if (isTypeParameterInSig(sym, sym0.enclClassChain))
+ else if (isTypeParameterInSig(sym, sym0.enclClass))
TVAR_TAG.toString+sym.name+";"
else if (sym == AnyClass || sym == AnyValClass || sym == SingletonClass)
jsig(ObjectClass.tpe)
@@ -337,8 +338,9 @@ abstract class Erasure extends AddInterfaces
if (etp eq tp) throw new UnknownSig
else jsig(etp)
}
+ }
}
- traceSig("javaSig", sym0, info, sym0.enclClassChain) {
+ traceSig("javaSig", sym0, info) {
if (needsJavaSig(info)) {
try Some(jsig2(true, Nil, info))
catch { case ex: UnknownSig => None }
diff --git a/test/files/jvm/t2585.check b/test/disabled/jvm/t2585.check
index e69de29bb2..e69de29bb2 100644
--- a/test/files/jvm/t2585.check
+++ b/test/disabled/jvm/t2585.check
diff --git a/test/files/jvm/t2585/Test.java b/test/disabled/jvm/t2585/Test.java
index 51fe20d81e..51fe20d81e 100644
--- a/test/files/jvm/t2585/Test.java
+++ b/test/disabled/jvm/t2585/Test.java
diff --git a/test/files/jvm/t2585/genericouter.scala b/test/disabled/jvm/t2585/genericouter.scala
index e06aa8101e..e06aa8101e 100644
--- a/test/files/jvm/t2585/genericouter.scala
+++ b/test/disabled/jvm/t2585/genericouter.scala