Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spurious "non-nullary method overrides nullary method" warning when mixing Scala and Java #6978

Closed
scabug opened this issue Jan 15, 2013 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Jan 15, 2013

the non-nullary method in question is in Java source code, so there isn't any way for me to make it nullary to make the warning go away.

% cat S.scala
trait T { def foo: Int }
class S extends J with T
% cat J.java 
class J { public int foo() { return 0; } }
% /usr/local/scala-2.10.0/bin/scalac -Xlint S.scala J.java
J.java:1: warning: non-nullary method overrides nullary method
class J { public int foo() { return 0; } }

in my particular codebase I was able to work around it by changing "class J" to "abstract class J extends T". but it does seem like a bug.

@scabug
Copy link
Author

scabug commented Jan 15, 2013

Imported From: https://issues.scala-lang.org/browse/SI-6978?orig=1
Reporter: @SethTisue
Affected Versions: 2.10.0

@scabug
Copy link
Author

scabug commented Oct 15, 2016

@som-snytt said:
Maybe that easy. scala/scala#5460

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants