iliavlad opened a new issue, #6432:
URL: https://github.com/apache/netbeans/issues/6432

   ### Apache NetBeans version
   
   Apache NetBeans 19
   
   ### What happened
   
   When using named arguments after unpacking Netbeans shows error hint (php 
version in Netbeans is set up to 8.2)
   
   ```
   <?php
   function test($a, $b, $c) {}
   test(...[1,2], c: 3);
   ```
   
   Expected: no error hint
   
   Actual: error hint presents
   
   ![hint in 
netbeans](https://github.com/apache/netbeans/assets/190661/00f3dbb4-8eda-4d8d-bf23-5e765400d452)
   
   
   ### How to reproduce
   
   function test($a, $b, $c) {}
   
   test(...[1,2], c: 3);
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Win11
   
   ### JDK
   
   20.0.1
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   It occurs every time
   
   Please, check https://www.php.net/manual/en/functions.arguments.php
   
   Example 20 Use named arguments after unpacking
   
   ```
   <?php
   function foo($a, $b, $c = 3, $d = 4) {
     return $a + $b + $c + $d;
   }
   
   var_dump(foo(...[1, 2], d: 40)); // 46
   var_dump(foo(...['b' => 2, 'a' => 1], d: 40)); // 46
   ```
   
   ### Are you willing to submit a pull request?
   
   No


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