diff options
author | Paul Phillips <paulp@improving.org> | 2009-09-21 14:04:26 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-09-21 14:04:26 +0000 |
commit | d117803f2a305608bc283359215642feee6448e1 (patch) | |
tree | ed29ea5104ed53ebfeefcf4219b8712c3528b166 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | d5b02c8652d7edbdfb0b5a02570d370d3bad299f (diff) | |
download | scala-d117803f2a305608bc283359215642feee6448e1.tar.gz scala-d117803f2a305608bc283359215642feee6448e1.tar.bz2 scala-d117803f2a305608bc283359215642feee6448e1.zip |
Re-enabled the self-type check which was breaki...
Re-enabled the self-type check which was breaking the overall build in
favor of disabling the check only when running scaladoc. This still
requires attention!
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 792e24049f..f7e5e51a1f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1157,22 +1157,19 @@ trait Typers { self: Analyzer => else psym addChild context.owner } - // !!! This block temporarily disabled because as of r18692 it is breaking - // the build. - // - // if (!(selfType <:< parent.tpe.typeOfThis) && - // !phase.erasedTypes && - // !(context.owner hasFlag SYNTHETIC) && // don't do this check for synthetic concrete classes for virtuals (part of DEVIRTUALIZE) - // !(settings.suppressVTWarn.value)) - // { - // //Console.println(context.owner);//DEBUG - // //Console.println(context.owner.unsafeTypeParams);//DEBUG - // //Console.println(List.fromArray(context.owner.info.closure));//DEBUG - // error(parent.pos, "illegal inheritance;\n self-type "+ - // selfType+" does not conform to "+parent + - // "'s selftype "+parent.tpe.typeOfThis) - // if (settings.explaintypes.value) explainTypes(selfType, parent.tpe.typeOfThis) - // } + if (!(selfType <:< parent.tpe.typeOfThis) && + !phase.erasedTypes && + !(context.owner hasFlag SYNTHETIC) && // don't do this check for synthetic concrete classes for virtuals (part of DEVIRTUALIZE) + !(settings.suppressVTWarn.value)) + { + //Console.println(context.owner);//DEBUG + //Console.println(context.owner.unsafeTypeParams);//DEBUG + //Console.println(List.fromArray(context.owner.info.closure));//DEBUG + error(parent.pos, "illegal inheritance;\n self-type "+ + selfType+" does not conform to "+parent + + "'s selftype "+parent.tpe.typeOfThis) + if (settings.explaintypes.value) explainTypes(selfType, parent.tpe.typeOfThis) + } if (parents exists (p => p != parent && p.tpe.typeSymbol == psym && !psym.isError)) error(parent.pos, psym+" is inherited twice") } |