Skip to content

Allow objects in define() #7149

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
Closed

Allow objects in define() #7149

wants to merge 1 commit into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Jun 14, 2021

With the introduction of enums, constants using the const X = Y syntax can now contain objects. However, define() still prohibits use of objects. This relaxes the restriction.

The const X = Y syntax currently only allows assigning enum objects in particular, simply because there is no syntactically supported way to create a different object. I don't see a point in restricting define() to allow only enum objects in particular though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants