From 8068e1208466ab17af40c2670230ba5ac9704e0c Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 3 May 2012 09:33:05 -0700 Subject: Moved a warning behind -Xlint. Eventually "-Xlint would have told you not to do that" will be a catchphrase, like "I love it when a plan comes together" or "respect mah authoritah." --- src/compiler/scala/tools/nsc/typechecker/Namers.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 4e7dac890b..e4296774a1 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -627,7 +627,7 @@ trait Namers extends MethodSynthesis { classAndNamerOfModule(m) = (tree, null) } val owner = tree.symbol.owner - if (owner.isPackageObjectClass) { + if (settings.lint.value && owner.isPackageObjectClass) { context.unit.warning(tree.pos, "it is not recommended to define classes/objects inside of package objects.\n" + "If possible, define " + tree.symbol + " in " + owner.skipPackageObject + " instead." -- cgit v1.2.3