You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2023/01/12 05:54:50 UTC

[GitHub] [netbeans] troizet opened a new issue, #5283: PHP: Generates the return type boolean instead of bool for a method when overriding a base class method with an autocomplete

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: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] KacerCZ commented on issue #5283: PHP: Generates the return type boolean instead of bool for a method when overriding a base class method with an autocomplete

Posted by GitBox <gi...@apache.org>.
KacerCZ commented on issue #5283:
URL: https://github.com/apache/netbeans/issues/5283#issuecomment-1381415264

   Reproducible.
   
   If method `Base::test()` has specified native return type `bool`, then generated method has also return type `bool`.
   So it may have same cause as bug #5284 when NetBeans tries to guess return type.
   
   Thanks for your report.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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


[GitHub] [netbeans] troizet closed issue #5283: PHP: Generates the return type boolean instead of bool for a method when overriding a base class method with an autocomplete

Posted by "troizet (via GitHub)" <gi...@apache.org>.
troizet closed issue #5283: PHP: Generates the return type boolean instead of bool for a method when overriding a base class method with an autocomplete
URL: https://github.com/apache/netbeans/issues/5283


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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