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 2022/12/12 09:41:07 UTC

[GitHub] [netbeans] the-liquid-metal opened a new issue, #5088: [PHP] Comparing enum case should produce warning

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

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   Since comparing enum case are not meaningful (always return false), it should produce warning.
   
   ### How to reproduce
   
   ```php
   <?php
   enum Suit: int {
     case Hearts = 1;
     case Diamonds = 2;
     case Clubs = 3;
     case Spades = 4;
   }
   
   var_dump(Suit::Hearts > Suit::Diamonds); // bool(false)
   if (Suit::Hearts > Suit::Diamonds) {} // this statement should display warning
   if (Suit::Hearts->value > Suit::Diamonds->value) {} // OK
   ```
   
   ### 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?
   
   No
   
   ### 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