From c71dfa1eefa65d4e8cd61063ea68482af4314913 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Sat, 15 Oct 2016 14:22:51 -0700 Subject: SI-6978 No linting of Java parens Don't lint overriding of nullary by non-nullary when non-nullary is Java-defined. They can't help it. --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala') diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 106b076eef..116c932365 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -472,7 +472,7 @@ abstract class RefChecks extends Transform { checkOverrideTypes() checkOverrideDeprecated() if (settings.warnNullaryOverride) { - if (other.paramss.isEmpty && !member.paramss.isEmpty) { + if (other.paramss.isEmpty && !member.paramss.isEmpty && !member.isJavaDefined) { reporter.warning(member.pos, "non-nullary method overrides nullary method") } } -- cgit v1.2.3