diff options
-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") } |