diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-14 23:49:53 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-14 23:49:53 +0100 |
commit | 465e538ef59171ac7d9e811dbdaec776f8a64ac7 (patch) | |
tree | 159f11ee7736daffa1a25abaaca9da49418a7ab6 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | 3dff364399d63c2dd317eb7bdf03f9d5216b2936 (diff) | |
parent | e86675f582ed8fef880f71744241f30e0d57a51c (diff) | |
download | scala-465e538ef59171ac7d9e811dbdaec776f8a64ac7.tar.gz scala-465e538ef59171ac7d9e811dbdaec776f8a64ac7.tar.bz2 scala-465e538ef59171ac7d9e811dbdaec776f8a64ac7.zip |
Merge remote-tracking branch 'origin/master' into topic/palladium0
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 8acc682063..b166bf988d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -467,6 +467,11 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans // overrideError("may not override parameterized type"); // @M: substSym def checkOverrideAlias() { + // Important: first check the pair has the same kind, since the substitution + // carries high's type parameter's bounds over to low, so that + // type equality doesn't consider potentially different bounds on low/high's type params. + // In b781e25afe this went from using memberInfo to memberType (now lowType/highType), tested by neg/override.scala. + // TODO: was that the right fix? it seems type alias's RHS should be checked by looking at the symbol's info if (pair.sameKind && lowType.substSym(low.typeParams, high.typeParams) =:= highType) () else overrideTypeError() // (1.6) } @@ -853,7 +858,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans val baseClass = clazz.info.baseTypeSeq(i).typeSymbol seenTypes(i) match { case Nil => - println("??? base "+baseClass+" not found in basetypes of "+clazz) + devWarning(s"base $baseClass not found in basetypes of $clazz. This might indicate incorrect caching of TypeRef#parents.") case _ :: Nil => ;// OK case tp1 :: tp2 :: _ => |