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

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   Generates the return type `boolean` instead of `bool` for a method when 
overriding a base class method with an autocomplete.
   Php does not have a built-in `boolean` type: 
https://www.php.net/manual/en/language.types.intro.php
   Also see the warning under "Scalar Types": 
https://www.php.net/manual/en/language.types.declarations.php
   
   ### How to reproduce
   
   - Create a base class with a test method that returns `true` or `false`:
   
   ```php
   class Base
   {
       
       public function test()
       {
           return true;
       }
       
   }
   ```
   
   - Create a subclass:
   
   ```php
   class SubClass extends Base
   {
   
   }
   ```
   
   - Press `Ctrl + Space` to autocomplete the subclass and select `test() - 
override`
   - A method with the wrong return type was received:
   ``` php
       public function test(): boolean {
           return parent::test();
       }
   ```
   instead of:
   ``` php
       public function test(): bool {
           return parent::test();
       }
   ```
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Debian 10
   
   ### JDK
   
   OpenJDK 64-Bit Server VM 11.0.16+8-post-Debian-1deb10u1
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### 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