summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-03-26 02:13:13 -0700
committerPaul Phillips <paulp@improving.org>2013-03-27 10:39:22 -0700
commit22944e474e038f11ac110661eb7e5edbea5d6d13 (patch)
tree10a50240110d17acbb46f3ba09ff98e2a6465f7d /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parente073975997a5291cbe76ea15e797a6783bb4d544 (diff)
downloadscala-22944e474e038f11ac110661eb7e5edbea5d6d13.tar.gz
scala-22944e474e038f11ac110661eb7e5edbea5d6d13.tar.bz2
scala-22944e474e038f11ac110661eb7e5edbea5d6d13.zip
SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlag
This commit shortens expressions of the form `if (settings.debug.value)` to `if (settings.debug)` for various settings. Rarely, the setting is supplied as a method argument. The conversion is not employed in simple definitions where the Boolean type would have to be specified.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index fe9608368d..924296c164 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -669,7 +669,7 @@ trait Namers extends MethodSynthesis {
m.updateAttachment(new ConstructorDefaultsAttachment(tree, null))
}
val owner = tree.symbol.owner
- if (settings.lint.value && owner.isPackageObjectClass && !mods.isImplicit) {
+ if (settings.lint && 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."
@@ -705,7 +705,7 @@ trait Namers extends MethodSynthesis {
// check that lower bound is not an F-bound
// but carefully: class Foo[T <: Bar[_ >: T]] should be allowed
for (tp1 @ TypeRef(_, sym, _) <- lo) {
- if (settings.breakCycles.value) {
+ if (settings.breakCycles) {
if (!sym.maybeInitialize) {
log(s"Cycle inspecting $lo for possible f-bounds: ${sym.fullLocationString}")
return sym