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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to