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

ast: Fix check if there is an ambiguous partial application #2298

Merged

Conversation

fridis
Copy link
Member

@fridis fridis commented Dec 4, 2023

The problem was that for a call without an explicit target, Call._target is originally null and the called feature was searched in all outer features. If found, _target is set to the corresponding outerFeature.this expression.

The code to check that there is no ambiguous partial application now must not restrict its search to this target, but use the null target.

In case of fields, using a specific target could even result in finding more fields due to scope checking that only happens for unqualified (i.e., w/o target) calls to fields.

This caused a failure in flang.dev's design/examples/aborteffect.fz.

The problem was that for a call without an explicit target, Call._target is
originally null and the called feature was searched in all outer features. If
found, _target is set to the corresponding `outerFeature.this` expression.

THe code to check that there is no ambiguous partial application now must not
restrict its search to this target, but use the null target.

In case of fields, using a specific target could even result in finding more
fields due to scope checking that only happens for unqualified (i.e., w/o
target) calls to fields.

This caused a failure in flang.dev's design/examples/aborteffect.fz.
@michaellilltokiwa michaellilltokiwa merged commit 2cbfcde into main Dec 4, 2023
5 checks passed
@michaellilltokiwa michaellilltokiwa deleted the fix_check_for_ambiguous_partial_application branch December 4, 2023 17:56
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

2 participants