diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-07-08 15:59:00 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-07-08 15:59:00 +0000 |
commit | bc5ac3dc9a03553072f69d1117ea2389473acd4a (patch) | |
tree | 8861152bae068e9630c176c331763fbbd76cbe0e /src/compiler/scala/tools/nsc/typechecker/Namers.scala | |
parent | 0cbeaf17d85d4925939d51938826c318db667c50 (diff) | |
download | scala-bc5ac3dc9a03553072f69d1117ea2389473acd4a.tar.gz scala-bc5ac3dc9a03553072f69d1117ea2389473acd4a.tar.bz2 scala-bc5ac3dc9a03553072f69d1117ea2389473acd4a.zip |
closes #3374.
review by odersky
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 2123a00550..53fb15dbeb 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1065,24 +1065,7 @@ trait Namers { self: Analyzer => case tp => tp } - - def verifyOverriding(other: Symbol): Boolean = { - if(other.unsafeTypeParams.length != tparamSyms.length) { - context.error(tpsym.pos, - "The kind of "+tpsym.keyString+" "+tpsym.varianceString + tpsym.nameString+ - " does not conform to the expected kind of " + other.defString + other.locationString + ".") - false - } else true - } - - // @M: make sure overriding in refinements respects rudimentary kinding - // have to do this early, as otherwise we might get crashes: (see neg/bug1275.scala) - // suppose some parameterized type member is overridden by a type member w/o params, - // then appliedType will be called on a type that does not expect type args --> crash - if (tpsym.owner.isRefinementClass && // only needed in refinements - !tpsym.allOverriddenSymbols.forall{verifyOverriding(_)}) - ErrorType - else polyType(tparamSyms, tp) + polyType(tparamSyms, tp) } /** Given a case class |