-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Support accessing members of a conditional value #35390
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
base: main
Are you sure you want to change the base?
Conversation
Note that the updated baselines point to a missing I would like to add a couple of missing test cases before marking as ready:
I am also thinking that it might be a good idea to write the tests so that they do not interact with #28077, so I will probably end up rewriting the existing test. What is the best place for these tests? (if I want to check the behavior on different subclasses, maybe |
The extended `LocustHorde` has two fields which have different types but share the same base type. This is interesting when using SQL constructs to select one of the two fields as they are compatible but have different types.
i.e. for issue dotnet#34589
I extended the tests and kept them in GoW, as the different handling of subclassing is interesting. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Just to add that this might be more complex: property/fields access might also include type casts in the chain. |
@Xriuk I will probably restrict this changeset to a more limited scope; the various types of expressions are (at least in part) handled by different translators, so to handle this in full generality some heavy restructuring of the translation pipeline might be needed. |
This changeset adds support for accessing a member of the result of a conditional expression.
It achieves this by folding the member access into the conditional.
Fixes #34589.