zephir icon indicating copy to clipboard operation
zephir copied to clipboard

Operators cannot be used to create constant variables

Open JellyBrick opened this issue 4 years ago • 1 comments

Code

limits.zep

...
final class Limits
{
    const INT8_MIN = -0x7f - 1;
...

Error log

 [ERROR] Syntax error in ...limits.zep on line 22

JellyBrick avatar Feb 14 '20 11:02 JellyBrick

It is not a bug, but more a feature request. Zephir doesn't allow operations on constants declaration.

sergeyklay avatar Feb 14 '20 12:02 sergeyklay