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 | |
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!
-rw-r--r-- | build.xml | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 29 |
2 files changed, 15 insertions, 16 deletions
@@ -1148,6 +1148,7 @@ DOCUMENTATION <stopwatch name="docs.lib.timer"/> <mkdir dir="${build-docs.dir}/library"/> <scaladoc + addParams="-Ysuppress-vt-typer-warnings" destdir="${build-docs.dir}/library" windowtitle="Scala Library" doctitle="Scala ${version.number} API" @@ -1231,6 +1232,7 @@ DOCUMENTATION <stopwatch name="docs.comp.timer"/> <mkdir dir="${build-docs.dir}/compiler"/> <scaladoc + addParams="-Ysuppress-vt-typer-warnings" destdir="${build-docs.dir}/compiler" windowtitle="Scala Compiler" doctitle="Scala Compiler ${version.number} API" 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") } |