diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-07-08 15:59:32 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-07-08 15:59:32 +0000 |
commit | fcb0419a279263fd419e97143694a8bf71c46e59 (patch) | |
tree | e88756200db1fda059431228fb4730ee7c65010f /src | |
parent | 45528c7e3b392e7f4e934d264ff803527c7d79cc (diff) | |
download | scala-fcb0419a279263fd419e97143694a8bf71c46e59.tar.gz scala-fcb0419a279263fd419e97143694a8bf71c46e59.tar.bz2 scala-fcb0419a279263fd419e97143694a8bf71c46e59.zip |
closes #3622: refchecks erased types without un...
closes #3622: refchecks erased types without uncurrying them first
review by odersky
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 9c0d11550f..ca642d3931 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -421,8 +421,9 @@ abstract class RefChecks extends InfoTransform { def javaErasedOverridingSym(sym: Symbol): Symbol = clazz.tpe.nonPrivateMemberAdmitting(sym.name, BRIDGE).filter(other => !other.isDeferred && other.isJavaDefined && { - val tp1 = erasure.erasure(clazz.thisType.memberType(sym)) - val tp2 = erasure.erasure(clazz.thisType.memberType(other)) + 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 + val tp1 = uncurryAndErase(clazz.thisType.memberType(sym)) + val tp2 = uncurryAndErase(clazz.thisType.memberType(other)) atPhase(currentRun.erasurePhase.next)(tp1 matches tp2) }) |