diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-12 17:47:54 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-12 17:47:54 -0800 |
commit | 9c4a6e3ed7624892f46948c1c0fb57d7d5b3346e (patch) | |
tree | b4b6d8fcedd45a8304d44c0dca3fe39a07fae065 /src/compiler | |
parent | 2240464dea5b13a487938f66878e3e84b180376a (diff) | |
parent | 427b82648422e4118c68f34e81c94deca3755deb (diff) | |
download | scala-9c4a6e3ed7624892f46948c1c0fb57d7d5b3346e.tar.gz scala-9c4a6e3ed7624892f46948c1c0fb57d7d5b3346e.tar.bz2 scala-9c4a6e3ed7624892f46948c1c0fb57d7d5b3346e.zip |
Merge pull request #3516 from adriaanm/t8177
SI-8177 co-evolve more than just RefinedTypes
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 2125e281f0..02dd63f011 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) } |