diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-07-03 23:59:39 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-07-04 08:13:23 +0200 |
commit | 1a2ec87c0964ad3bf42d49bbdaebd66b45506210 (patch) | |
tree | 154301d14663acfc7420a2181370012364f1b71f /src/compiler | |
parent | 33936243bdf597e438de8d10ae7b3ed30454be9f (diff) | |
download | scala-1a2ec87c0964ad3bf42d49bbdaebd66b45506210.tar.gz scala-1a2ec87c0964ad3bf42d49bbdaebd66b45506210.tar.bz2 scala-1a2ec87c0964ad3bf42d49bbdaebd66b45506210.zip |
SI-6013 Disallow deferred members from intermediate java parents.
76c76b28f allowed for the fact that a Java method can override
a super class method without matching its type in a Scala sense;
it need only match its type after erasure. However that change
went too far, and considered a concrete method in a base class
to override a deferred method in a subclass.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 44fd4e9afd..7318538de7 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -536,7 +536,7 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R def javaErasedOverridingSym(sym: Symbol): Symbol = clazz.tpe.nonPrivateMemberAdmitting(sym.name, BRIDGE).filter(other => - !other.isDeferred && other.isJavaDefined && { + !other.isDeferred && other.isJavaDefined && !sym.enclClass.isSubClass(other.enclClass) && { // #3622: erasure operates on uncurried types -- // note on passing sym in both cases: only sym.isType is relevant for uncurry.transformInfo // !!! erasure.erasure(sym, uncurry.transformInfo(sym, tp)) gives erreneous of inaccessible type - check whether that's still the case! |