From 32a05ddfef09ac27904d9771ddf0ed8b4380e94a Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 8 Dec 2016 14:45:40 -0800 Subject: 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. --- src/compiler/scala/tools/nsc/settings/Warnings.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/scala/tools/nsc/settings') 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. -- cgit v1.2.3