Permalink
Browse files

Relax -Xlint warning for implicit classes. Closes SI-5809.

  • Loading branch information...
paulp committed May 23, 2012
1 parent d3bb612 commit 006e12a119e6fd5fc40584d4edb4c11f4ffdf7f9
@@ -636,7 +636,7 @@ trait Namers extends MethodSynthesis {
classAndNamerOfModule(m) = (tree, null)
}
val owner = tree.symbol.owner
- if (settings.lint.value && owner.isPackageObjectClass) {
+ if (settings.lint.value && owner.isPackageObjectClass && !mods.isImplicit) {
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."
@@ -0,0 +1 @@
+-Xlint -Xfatal-warnings
View
@@ -0,0 +1,10 @@
+package scala.reflect
+
+package object api {
+ implicit class PimpedExpr[T](expr: Universe # Expr[T]) {
+ def runtimeEval: T = {
+ println("hello, dear")
+ expr.eval
+ }
+ }
+}

0 comments on commit 006e12a

Please sign in to comment.