-
Notifications
You must be signed in to change notification settings - Fork 150
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
Address all errors reported by IntelliJ #3867
Conversation
a9b97fd
to
ab746d4
Compare
We can discuss during the meeting if we should align our code to IntelliJ or the default compiler. |
Yeah, I'm in favour of making tooling work properly on our code - no point having code that's accepted by the compiler if it's really painful to run our tooling on it because there's a big pile of errors being thrown up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The n-ary instantiation code is unfortunate, but I'm definitely on the side of having working tooling over beatiful code.
Perhaps take a look at the Scala version that the IntelliJ checker is using; that might change some of the results. @radumereuta please post settings |
@radumereuta @Baltoli Using However, I am still in favor of using
|
lgtm, you can merge as is. |
Yep, agreed - go ahead |
This PR addresses all errors reported by IntelliJ.
Constructors.scala
andKORE.scala
def foo(x: Bar*)
public void foo(Seq<Bar> x)
public void foo(Bar[] x)
when marked with@annotation.varargs
@annotation.varargs
, IntellIiJ is unable to resolve any usage ofpublic void foo(Seq<Bar> x)
@annotation.varargs
would fix this, but also lose thepublic void foo(Bar[] x)
version that we use pervasively.public void foo(Seq<Bar> x)
fixes the IntelliJ error, but won't compile due to conflicts with the generated one.def foo(x: Seq[Bar])
, then manually provide overloadsdef foo(x: Array[Bar]) = foo(x.toSeq)
to supportpublic void foo(Bar[] x)
def foo(x1: Bar, ..., xN: Bar) = foo(Seq(x1, ..., xN))
to support variadic calls with0 <= N <= 5
The only remaining reported error is the use of a deprecated method here:
k/kernel/src/main/java/org/kframework/kserver/KServerFrontEnd.java
Line 175 in 5fbbe23
I was unsure whether this was required for NailGun, and left it in place accordingly.