inline field How does it work???

This is the code I have

If I ask it to inline i in the sout, I get an error dialog. If I change i from field to local variable and ask to inline, it works.

Is the field inlining handled differently than the local variable inlining?

2 comments

On 2004/02/17 00:44, Vinay Moharil wrote:

Is the field inlining handled differently than the local variable inlining?


Unfortunately IDEA can't inline a field, as far as I know...

Bas

0

Vinay Moharil wrote:

This is the code I have

 {
>   public final int i = 20;
>   public X()
>   {
>     System.out.println("X is " + i);
>   }
> }]]>

If I ask it to inline i in the sout, I get an error dialog. If I change i from field to local variable and ask to inline, it works.

Is the field inlining handled differently than the local variable inlining?


There's an existing feature request for this
(http://www.intellij.net/tracker/idea/viewSCR?publicId=29534). Feel free
to vote for it.

--
Regards,
Rob Harwood
Software Developer
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.