You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/05/23 06:15:31 UTC

[GitHub] [netbeans] jlahoda opened a new pull request #2151: [NETBEANS-4356] Code Completion must check also superclass/superinter…

jlahoda opened a new pull request #2151:
URL: https://github.com/apache/netbeans/pull/2151


   …face methods when determining if cast is required.
   
   Consider code like:
   `package test;\n" +
   public class Test {\n" +
       public interface Base {\n" +
           public void test() { }\n" +
       }\n" +
       public interface Int extends Base {\n" +
       }\n" +
       public static class Impl implements Int {\n" +
            public void test() { }\n" +
       }\n" +
       private t(Int b) {\n" +
           if (b instanceof Impl) {\n" +
               b.tes",
   `
   
   And invoke code completion, and choose "test()". The code completion then needs to determine if a cast of "b" to "Impl" is needed of not. So it will look into the type of "b", which is "Int", to see if "test()" is declared there. But it is not, and so the cast will be generated, despite the method being declared in a supertype.
   
   I believe it should look not only at methods declared directly in "Int", but on all members of "Int", even those that are inherited. Which is what this patch tries to do.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi commented on pull request #2151: [NETBEANS-4356] Code Completion must check also superclass/superinter…

Posted by GitBox <gi...@apache.org>.
lkishalmi commented on pull request #2151:
URL: https://github.com/apache/netbeans/pull/2151#issuecomment-644991342


   Approved and looks fine, let's merge it then!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] arvindaprameya commented on pull request #2151: [NETBEANS-4356] Code Completion must check also superclass/superinter…

Posted by GitBox <gi...@apache.org>.
arvindaprameya commented on pull request #2151:
URL: https://github.com/apache/netbeans/pull/2151#issuecomment-643212543


   +1 Approved, Thanks for addressing this .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] lkishalmi merged pull request #2151: [NETBEANS-4356] Code Completion must check also superclass/superinter…

Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #2151:
URL: https://github.com/apache/netbeans/pull/2151


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists