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

[release/9.0] Add explicit casts for generated null in method calls. #34523

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

AndriySvyryd
Copy link
Member

Fixes #34515

Description

When expressions generated as part of the compiled model contain a method call with a null argument they might fail to compile if there are ambiguous overloads. This is fixed by generating an explicit cast.

Customer impact

The generated compiled model doesn't compile and needs to be fixed manually after every time it's regenerated.

How found

Reported by a customer.

Regression

No.

Testing

Tests added.

Risk

Low. This code is only invoked at design-time.

@AndriySvyryd AndriySvyryd requested review from a team and artl93 August 24, 2024 03:43
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We should ideally do this more accurately, i.e. specifically go over method arguments and detect the cases where the null would be ambiguous... But that's complicated and this is good enough...

@AndriySvyryd AndriySvyryd enabled auto-merge (squash) August 24, 2024 09:03
@AndriySvyryd
Copy link
Member Author

LGTM.

We should ideally do this more accurately, i.e. specifically go over method arguments and detect the cases where the null would be ambiguous... But that's complicated and this is good enough...

It might make compilation marginally faster in general as there's less guesswork. And readability isn't really a goal here.

@AndriySvyryd AndriySvyryd merged commit b59aa3a into release/9.0 Aug 27, 2024
7 checks passed
@AndriySvyryd AndriySvyryd deleted the Issue34515 branch August 27, 2024 18:46
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.

2 participants