infix calls red

Hi,

At the moment (using IDEA 10.5, nightly builds of the plugin) the dominant source of "good code red" (for me) is infix style calls.
Is it worthwile to file YouTrack requests for this at this point in time, or should I wait until initial support is included in the plugin?

For example, the following code displays an error "Expression of type Unit doesn't conform to expected type Nothing":


val pool = Executors.newFixedThreadPool(3)
pool shutdown()


-tt

3 comments
Comment actions Permalink

Do you have type-aware highlighting enabled? I haven't really seen much problem with infix calls not being recognized.

0
Comment actions Permalink

Infix calls in plugin have different codebase from usual calls. This is wrong, and I want to fix all infix and postfix issues by adding code transformator (internal IDEA's transformator like in compiler, like I did it for "for statments") from infix/postfix call to dot-call.
So it can fix such problems like you reported.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

Hi Alexander,

With the last "Common interface for all calls" commit, the simple "pool shutdown()" example above still triggers an error, this time a different one: "too many arguments for method shutdown".
However, many other "good code red" highlightings regarding infix calls are now gone. This is a great improvement :)

It seems this triggers some new issues also, for example http://youtrack.jetbrains.net/issue/SCL-3311

-tt

0

Please sign in to leave a comment.