summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-08-28 17:05:08 +0000
committerMartin Odersky <odersky@gmail.com>2008-08-28 17:05:08 +0000
commitb85a3d25fcba0e6c6f056b926d02e87fc3b5b041 (patch)
tree3712943f46dbe46bb7a13ef97aa8c2fe56d20ffc /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent44bd48af53d309272941b79962490ec295f7a7ea (diff)
downloadscala-b85a3d25fcba0e6c6f056b926d02e87fc3b5b041.tar.gz
scala-b85a3d25fcba0e6c6f056b926d02e87fc3b5b041.tar.bz2
scala-b85a3d25fcba0e6c6f056b926d02e87fc3b5b041.zip
Fixed #1280, #1289
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala5
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 6c50f40d9b..30a1fdc202 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -218,9 +218,10 @@ abstract class RefChecks extends InfoTransform {
//if (!member.typeParams.isEmpty) // (1.7) @MAT
// overrideError("may not be parameterized");
var memberTp = self.memberType(member)
-
- if (!(self.memberInfo(other).bounds containsType memberTp)) { // (1.7.1) {
+ val otherTp = self.memberInfo(other)
+ if (!(otherTp.bounds containsType memberTp)) { // (1.7.1) {
overrideTypeError(); // todo: do an explaintypes with bounds here
+ explainTypes(_.bounds containsType _, otherTp, memberTp)
}
// check overriding (abstract type --> abstract type or abstract type --> concrete type member (a type alias))