summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-18 21:05:23 +0000
committerPaul Phillips <paulp@improving.org>2011-07-18 21:05:23 +0000
commit44b9cf0ca9606f531218deefe7792b4476552291 (patch)
tree651f2e377985f29aa74748dcbd4b2bd26da71fd3 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent658ba1b4e6898df65119f9cb6488ed8908c399ef (diff)
downloadscala-44b9cf0ca9606f531218deefe7792b4476552291.tar.gz
scala-44b9cf0ca9606f531218deefe7792b4476552291.tar.bz2
scala-44b9cf0ca9606f531218deefe7792b4476552291.zip
Modified erasure so we have enough information ...
Modified erasure so we have enough information to determine whether we need to use scala or java erasure semantics. This fixes the runtime failure illustrated here: % scala29 -e 'java.util.Collections.max(null)' java.lang.NoSuchMethodError: java.util.Collections.max(Ljava/util/Collection;)Ljava/lang/Comparable; Review by odersky.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 8a05045514..bf6e7a91ba 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -468,7 +468,9 @@ abstract class RefChecks extends InfoTransform {
def javaErasedOverridingSym(sym: Symbol): Symbol =
clazz.tpe.nonPrivateMemberAdmitting(sym.name, BRIDGE).filter(other =>
!other.isDeferred && other.isJavaDefined && {
- def uncurryAndErase(tp: Type) = erasure.erasure(uncurry.transformInfo(sym, tp)) // #3622: erasure operates on uncurried types -- note on passing sym in both cases: only sym.isType is relevant for uncurry.transformInfo
+ // #3622: erasure operates on uncurried types --
+ // note on passing sym in both cases: only sym.isType is relevant for uncurry.transformInfo
+ def uncurryAndErase(tp: Type) = erasure.erasure(sym, uncurry.transformInfo(sym, tp))
val tp1 = uncurryAndErase(clazz.thisType.memberType(sym))
val tp2 = uncurryAndErase(clazz.thisType.memberType(other))
atPhase(currentRun.erasurePhase.next)(tp1 matches tp2)