[php-src] Issue #9500: PHP8.2 Disjunctive Normal Form Types - readonly property followed by `(`
| From: | SpacePossum | Date: | Wed, 07 Sep 2022 20:26:19 +0000 |
| Subject: | [php-src] Issue #9500: PHP8.2 Disjunctive Normal Form Types - readonly property followed by `(` | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242374@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9500
Author: SpacePossum
### Description
The following code:
```php
<?php
class Dnf
{
private A|(B&C) $a; // valid
private (B&C)|A $b; // valid
private readonly A|(B&C) $c; // valid
private readonly (B&C)|A $d; // invalid?
}
```
Resulted in this output:
```
Parse error: syntax error, unexpected token "(", expecting variable in app/test.php on
line 7
```
But I expected this output instead:
```
```
### PHP Version
php:8.2.0RC1-zts-alpine3.16
### Operating System
_No response_