junichi11 opened a new pull request, #4966:
URL: https://github.com/apache/netbeans/pull/4966

   #### PHP 8.1 Support: New in initializers (Part 5) 
   
   - https://issues.apache.org/jira/browse/NETBEANS-5599
   - RFC:https://wiki.php.net/rfc/new_in_initializers
   - Support for field and method access for constant (e.g. `const C = new A(); 
C->field; C->method();`)
   - Fix the parser
   - Fix PHP81UnhandledError
   
   
![nb-php81-new-in-initializers-const-access](https://user-images.githubusercontent.com/738383/201823248-881833f0-359e-4fdc-bd8b-bfe187c4152a.png)
   
   #### PHP 8.2 Support: Fetch properties of enums in const expressions (Part 
1) 
   
   - #4725
   - https://wiki.php.net/rfc/fetch_property_in_const_expressions
   - Fix the grammar file
   - Fix CC: add the readonly name property to enums
   - Add/Fix unit tests for the parser and CC
   
   
![nb-php82-fetch-properties-of-enum-in-const-expressions1](https://user-images.githubusercontent.com/738383/201822710-e3cc31eb-e50c-4516-8c47-32ecdaa75d94.png)
   
![nb-php82-fetch-properties-of-enum-in-const-expressions2](https://user-images.githubusercontent.com/738383/201822729-3c4d07af-ffd5-4d73-b0fe-b00a557fbb1a.png)
   
   ##### Note
   
   The following code is valid but I don't think these are meaningful. So, I 
don't support these cases at the moment.
   
   ```php
   const A = (null)?->test;
   
   const B = (null)?->test->test;
   
   const C = (null)->test?->test;
   
   const D = (null)?->test['test'];
   
   const E = (null)['test']?->test;
   
   const F = (null)?->{new Printer};
   
   const G = (null)?->test + (new Printer ? 1 : 0);
   
   const H = (1)->prop;
   
   const I = (1)?->prop;
   ````
   


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