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 2019/06/22 05:42:11 UTC

[GitHub] [netbeans] jlahoda opened a new pull request #1315: When printing types, print intersection types properly.

jlahoda opened a new pull request #1315: When printing types, print intersection types properly.
URL: https://github.com/apache/netbeans/pull/1315
 
 
   Consider this code:
   ---
   public class TestVar {
   
       public static void main(String[] args) {
           var v = get();
       }
   
       private static <Z extends C & I> Z get() {
           return null;
       }
       public static class C {}
       public static interface I {}
   }
   ---
   
   Now, press Ctrl and hover over the "v" in "var v = get();". There will be a tooltip saying "<unknown>", which is wrong. The type of the variable is an intersection type, and the type printer does not know how to print it. With this patch, the printed type will be "TestVar.C & TestVar.I".

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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