You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "sroeper (via GitHub)" <gi...@apache.org> on 2023/03/18 10:06:46 UTC

[GitHub] [netbeans] sroeper commented on issue #5260: Uncompilable code exception with Compile on Save

sroeper commented on issue #5260:
URL: https://github.com/apache/netbeans/issues/5260#issuecomment-1474803307

   I can confirm that you get an error message:
   `--- exec-maven-plugin:3.1.0:exec (default-cli) @ AssertjTest ---
   Exception in thread "main" java.lang.RuntimeException: Uncompilable code`
   
   with Compile on Save on.
   
   Envirnoment:
   Product Version: Apache NetBeans IDE 17
   Java: 17.0.4; Java HotSpot(TM) 64-Bit Server VM 17.0.4+11-LTS-179
   Runtime: Java(TM) SE Runtime Environment 17.0.4+11-LTS-179
   System: Mac OS X version 13.2.1 running on aarch64; UTF-8; de_DE (nb)
   
   Test Code:
   
   ```java
   import java.util.Collection;
   
   public class Main {
   
     static class Foo {
       Integer x;
     }
   
     public static void main(String[] args) {
       Foo x = new Foo();
   
       if (x instanceof Collection<?> col) {
         System.out.println("x is a collection");
       } else {
         System.out.println("not a collection");
       }
     }
   }
   ```
   
   Works without the pattern matching col variable,
   I use CoS in every project and most of them are big, so CoS is an advantage especially when I write test.  It cost me hours to find that, so I would like to see that this get fixed.
   


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

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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