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

Don't create a class field for every enum field #11452

Merged
merged 2 commits into from Jan 11, 2024

Conversation

Simn
Copy link
Member

@Simn Simn commented Dec 27, 2023

I don't think I ever really realized that we create a full tclass_field for every tenum_field just so we can build a TAnon from it, and we only do that so that one lookup can PMap.find on its fields. That seems a bit pointless, so I'd like to change it.

I happen to maintain a library that broke with this change because it was actually looking at the anon fields, so there's potential for some friction here. But that should be well within reason.

They only exist so that type_field can find them easily, but it might as well just check the constructors, which it already does anyway.
@Simn Simn mentioned this pull request Jan 9, 2024
27 tasks
@Simn Simn merged commit 87828d4 into development Jan 11, 2024
122 checks passed
@Simn Simn deleted the no_class_fields_for_every_enum_field branch January 11, 2024 08:49
@skial skial mentioned this pull request Jan 11, 2024
1 task
0b1kn00b pushed a commit to 0b1kn00b/haxe that referenced this pull request Jan 25, 2024
…on#11452)

They only exist so that type_field can find them easily, but it might as well just check the constructors, which it already does anyway.
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

Successfully merging this pull request may close these issues.

None yet

1 participant