Skip to content

Support generating properties, constants and parameter default values with ENUM references#166

Merged
Ocramius merged 4 commits into4.8.xfrom
value_generator_enum_support
Dec 8, 2022
Merged

Support generating properties, constants and parameter default values with ENUM references#166
Ocramius merged 4 commits into4.8.xfrom
value_generator_enum_support

Conversation

@Ocramius
Copy link
Member

@Ocramius Ocramius commented Dec 8, 2022

This is a rebased and adjusted version of #143.

With this change, ENUMs can be used as default values in generated code (properties, parameters, etc).

Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA no

Closes #143

Rastusik and others added 4 commits December 8, 2022 02:35
Signed-off-by: Rastusik <mfris@pixelfederation.com>
Signed-off-by: Rastusik <mfris@pixelfederation.com>
…type inference/analysis

Signed-off-by: Marco Pivetta <ocramius@gmail.com>
…code won't make sense out of context

Generated code should **NEVER** consider its current namespace, or else it becomes a huge scope
backtracking spaghetti mess.

This change ensures that the generated ENUM reference is always using the ENUM FQCN.

Also, this test ensures that automatic inference of ENUM types in the `ValueGenerator` works
as expected.

Signed-off-by: Marco Pivetta <ocramius@gmail.com>
@Ocramius Ocramius added this to the 4.8.0 milestone Dec 8, 2022
@Ocramius Ocramius self-assigned this Dec 8, 2022
@Ocramius Ocramius changed the title Value generator enum support Support generating properties, constants and parameter default values with ENUM references Dec 8, 2022
@Ocramius Ocramius merged commit de371cb into 4.8.x Dec 8, 2022
@Ocramius Ocramius deleted the value_generator_enum_support branch December 8, 2022 01:52
@Ocramius
Copy link
Member Author

Ocramius commented Dec 8, 2022

Thanks @Rastusik!

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.

1 participant