diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-08-13 16:21:40 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-08-13 16:21:40 +0000 |
commit | 9550c2077cc69434a460171ddd021a1de7ca1da4 (patch) | |
tree | b4719a0d8b78eb643ffde773db1209b98b959cf4 /src | |
parent | 29f9d75674205eb8f3db63829eeb1ff7d781694c (diff) | |
download | scala-9550c2077cc69434a460171ddd021a1de7ca1da4.tar.gz scala-9550c2077cc69434a460171ddd021a1de7ca1da4.tar.bz2 scala-9550c2077cc69434a460171ddd021a1de7ca1da4.zip |
closes #3419: test files
omit check that wouldn't work with separate compilation, not needed
anymore because compiler has become more robust
the actual fix was committed as part of r22512, see #3374
also see #3512
no review
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 22a1bee9b2..b3ea178aaa 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1067,6 +1067,17 @@ trait Namers { self: Analyzer => case tp => tp } + + // see neg/bug1275, #3419 + // used to do a rudimentary kind check here to ensure overriding in refinements + // doesn't change a type member's arity (number of type parameters), + // e.g. trait T { type X[A] }; type S = T{type X}; val x: S + // X in x.X[A] will get rebound to the X in the refinement, which does not take any type parameters + // this mismatch does not crash the compiler (anymore), but leads to weird type errors, + // as x.X[A] will become NoType internally + // it's not obvious the errror refers to the X in the refinement and not the original X + // however, separate compilation requires the symbol info to be loaded to do this check, + // but loading the info will probably lead to spurious cyclic errors --> omit the check polyType(tparamSyms, tp) } |