Skip to content

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