Skip to content

Fix GH-16665: \array and \callable should not be usable #16683

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

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Nov 2, 2024

This list was initially introduced in 53a4038, but never included array or callable. I suppose this is because int & friends are not actual tokens, while array and callable are. This means it was never possible to do class array, which is probably the reason this was overlooked.

This list was initially introduced in 53a4038, but never included array or
callable. I suppose this is because int & friends are not actual tokens,
while array and callable are. This means it was never possible to do class
array, which is probably the reason this was overlooked.
@nielsdos nielsdos linked an issue Nov 2, 2024 that may be closed by this pull request
@jorgsowa
Copy link
Contributor

jorgsowa commented Nov 2, 2024

What about other keywords like readonly, private, etc.? It's also not possible to create such classes.

@nielsdos
Copy link
Member Author

nielsdos commented Nov 3, 2024

But those don't indicate types while array and callable do.

Comment on lines +217 to +218
/* These are not usable as class names because they're proper tokens,
* but they are here for class aliases. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about list, while, ..?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment #16683 (comment)

@nielsdos nielsdos requested review from iluuu1994 and dstogov November 5, 2024 19:09
@nielsdos nielsdos closed this in 96d1cd0 Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\array should not be usable
5 participants