#688: static modifier

If I define a method like this:

public foo() {}

IDEA underlines the method name with curly line and tells: "Invalid method
declaration, return type required". This is right. But if I create a method
like this:

public static foo() {}

IDEA underlines "static" modifier and tells "Modifier static not allowed
here" which is not true. What it should do is just point out that return
type is missed.

P.S. BTW, it would be nice if I could copy error message to the clipboard.
Maybe you could add this option to context menu?

Michael Jouravlev.


2 comments
Comment actions Permalink

"Michael Jouravlev" <mikus@mail.ru> wrote in message
news:at5tuc$l3j$1@is.intellij.net...

If I define a method like this:

>

public foo() {}

>

IDEA underlines the method name with curly line and tells: "Invalid method
declaration, return type required". This is right. But if I create a

method

like this:

>

public static foo() {}

>

IDEA underlines "static" modifier and tells "Modifier static not allowed
here" which is not true. What it should do is just point out that return
type is missed.


This should probably be submitted as a bug report in the IDEA Tracker
(http://www.intellij.net/tracker/idea/browse). I'm not sure if this bug has
already been submitted, so you'll want to use the Tracker's search engine
(http://www.intellij.net/tracker/idea/searchSCR?ok=search) before
submitting.

P.S. BTW, it would be nice if I could copy error message to the clipboard.
Maybe you could add this option to context menu?


Feature requests may also be posted through the IDEA Tracker.

chris


0
Comment actions Permalink

Added both to tracker and voted for CVS window cosmetic bug at
http://www.intellij.net/tracker/idea/viewSCR?publicId=7276 .

"Chris Bartley" <spam@feynman.org> wrote in message
news:at5v9q$mr9$1@is.intellij.net...

"Michael Jouravlev" <mikus@mail.ru> wrote in message
news:at5tuc$l3j$1@is.intellij.net...

If I define a method like this:

>

public foo() {}

>

IDEA underlines the method name with curly line and tells: "Invalid

method

declaration, return type required". This is right. But if I create a

method

like this:

>

public static foo() {}

>

IDEA underlines "static" modifier and tells "Modifier static not allowed
here" which is not true. What it should do is just point out that return
type is missed.

>

This should probably be submitted as a bug report in the IDEA Tracker
(http://www.intellij.net/tracker/idea/browse). I'm not sure if this bug

has

already been submitted, so you'll want to use the Tracker's search engine
(http://www.intellij.net/tracker/idea/searchSCR?ok=search) before
submitting.

>

P.S. BTW, it would be nice if I could copy error message to the

clipboard.

Maybe you could add this option to context menu?

>

Feature requests may also be posted through the IDEA Tracker.

>

chris

>
>


0

Please sign in to leave a comment.