Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error: syntax error, unexpected token "private(set)" #331

Closed
devtvd opened this issue Jan 8, 2025 · 1 comment
Closed

Parse error: syntax error, unexpected token "private(set)" #331

devtvd opened this issue Jan 8, 2025 · 1 comment

Comments

@devtvd
Copy link

devtvd commented Jan 8, 2025

Pint Version

1.19.0

PHP Version

8.4.1

Description

Getting Parse error: syntax error, unexpected token "private(set)" when parsing constructor with asymmetric visibility property.

Steps To Reproduce

Example class

readonly class Scripts
{
    public function __construct(
        private(set) ?string $body = null,
    ) {
    }
}
@devtvd
Copy link
Author

devtvd commented Jan 8, 2025

Sorry, my bad - forgot it’s a readonly class.

@devtvd devtvd closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant