Permalink
Browse files

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."
  • Loading branch information...
paulp committed May 3, 2012
1 parent aad241e commit 8068e1208466ab17af40c2670230ba5ac9704e0c
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/compiler/scala/tools/nsc/typechecker/Namers.scala
  2. +1 −1 test/files/neg/package-ob-case.flags
@@ -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."
@@ -1 +1 @@
-Xfatal-warnings
-Xfatal-warnings -Xlint

0 comments on commit 8068e12

Please sign in to comment.