summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-12-08 14:45:40 -0800
committerSom Snytt <som.snytt@gmail.com>2016-12-14 12:34:01 -0800
commit32a05ddfef09ac27904d9771ddf0ed8b4380e94a (patch)
tree35a63415709e8006e18289924d2c6a400e1fce83 /src/compiler/scala/tools/nsc/settings
parentca7bbcfb178c5a0c697a3cdd543e38f37b79f737 (diff)
downloadscala-32a05ddfef09ac27904d9771ddf0ed8b4380e94a.tar.gz
scala-32a05ddfef09ac27904d9771ddf0ed8b4380e94a.tar.bz2
scala-32a05ddfef09ac27904d9771ddf0ed8b4380e94a.zip
SI-8704 Also warn if effectively multiple implicit
Current semantics are that leading implicit param turns the parameter section into an implicit section (though without making other params implicitly implicit). Warn if more than one head of a param section is implicit, since that results in multiple implicit param sections.
Diffstat (limited to 'src/compiler/scala/tools/nsc/settings')
-rw-r--r--src/compiler/scala/tools/nsc/settings/Warnings.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/Warnings.scala b/src/compiler/scala/tools/nsc/settings/Warnings.scala
index 839e734abc..87534656f9 100644
--- a/src/compiler/scala/tools/nsc/settings/Warnings.scala
+++ b/src/compiler/scala/tools/nsc/settings/Warnings.scala
@@ -25,6 +25,8 @@ trait Warnings {
// currently considered too noisy for general use
val warnUnusedImport = BooleanSetting("-Ywarn-unused-import", "Warn when imports are unused.")
+ val warnExtraImplicit = BooleanSetting("-Ywarn-extra-implicit", "Warn when more than one implicit parameter section is defined.")
+
// Experimental lint warnings that are turned off, but which could be turned on programmatically.
// They are not activated by -Xlint and can't be enabled on the command line because they are not
// created using the standard factory methods.