diff options
author | Antonio Cunei <antonio.cunei@epfl.ch> | 2008-11-25 18:05:48 +0000 |
---|---|---|
committer | Antonio Cunei <antonio.cunei@epfl.ch> | 2008-11-25 18:05:48 +0000 |
commit | af47e5b433ea538bf096a176c88f3c91116e09cd (patch) | |
tree | b3e66e93fb653570ebbef16183cf4f2be2111c12 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | 2d61f09332dbc6038f869c6a23a95dca1bc3b6c7 (diff) | |
download | scala-af47e5b433ea538bf096a176c88f3c91116e09cd.tar.gz scala-af47e5b433ea538bf096a176c88f3c91116e09cd.tar.bz2 scala-af47e5b433ea538bf096a176c88f3c91116e09cd.zip |
Merging everything from the 2.8.x development b...
Merging everything from the 2.8.x development branch back to trunk.
- If you were working on trunk, please keep working on trunk If you were
- working on 2.8-devel, please switch to trunk now
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index e18b3f6130..d1f0edc7c1 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -134,7 +134,7 @@ abstract class RefChecks extends InfoTransform { def overrideError(msg: String) { if (other.tpe != ErrorType && member.tpe != ErrorType) - unit.error(pos, "error overriding " + infoStringWithLocation(other) + + unit.error(pos, "overriding " + infoStringWithLocation(other) + ";\n " + infoString(member) + " " + msg + (if ((other.owner isSubClass member.owner) && other.isDeferred && !member.isDeferred) @@ -146,7 +146,7 @@ abstract class RefChecks extends InfoTransform { def overrideTypeError() { if (other.tpe != ErrorType && member.tpe != ErrorType) { - overrideError("has incompatible type "+analyzer.underlying(member).tpe.normalize) + overrideError("has incompatible type") } } @@ -455,8 +455,9 @@ abstract class RefChecks extends InfoTransform { case ExistentialType(tparams, result) => validateVariances(tparams map (_.info), variance) validateVariance(result, variance) - case AnnotatedType(attribs, tp, selfsym) => - validateVariance(tp, variance) + case AnnotatedType(annots, tp, selfsym) => + if (!(annots exists (_.atp.typeSymbol.isNonBottomSubClass(uncheckedVarianceClass)))) + validateVariance(tp, variance) } def validateVariances(tps: List[Type], variance: Int) { |