the-liquid-metal opened a new issue, #5072:
URL: https://github.com/apache/netbeans/issues/5072

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   Netbeans already able to validate and highlight class name in context of 
intersection types. All accepted position: function argument type, function 
return type, property type are fine. Unfortunately this did not happen to 
interface. There are:
   - missing validation and highlighting on function return type, property type.
   - missing validation on function argument type.
   
   ### How to reproduce
   
   ```php
   <?php
   class Class1 {}
   class Class2 {}
   interface Iface1 {}
   interface Iface2 {}
   
   // displayed highlight: all accept null
   // missing highlight: [none]
   // displayed error: null and duplicate Class1
   // missing error: duplicate Iface1
   function funcX(Class1 & Class2 & Iface1 & Iface2 & null & Class1 & Iface1 
$arg1) {
       echo $arg1;
   }
   
   // displayed highlight: Class1 and Class2
   // missing highlight: Iface1 and Iface2
   // displayed error: null and duplicate Class1
   // missing error: duplicate Iface1
   function funcY($arg1): Class1 & Class2 & Iface1 & Iface2 & null & Class1 & 
Iface1 {
       echo $arg1;
   }
   
   class Class3 {
       // displayed highlight: Class1 and Class2
       // missing highlight: Iface1 and Iface2
       // displayed error: null and duplicate Class1
       // missing error: duplicate Iface1
       public Class1 & Class2 & Iface1 & Iface2 & null & Class1 & Iface1 $prop1;
   }
   ```
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 10
   
   ### JDK
   
   Java: 14.0.1; Java HotSpot(TM) 64-Bit Server VM 14.0.1+7 Runtime: Java(TM) 
SE Runtime Environment 14.0.1+7
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   Yes
   
   ### Code of Conduct
   
   Yes


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