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

Dyno: fix iterator type methods #26457

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

DanilaFe
Copy link
Contributor

@DanilaFe DanilaFe commented Jan 2, 2025

Closes https://github.com/Cray/chapel-private/issues/6923.

Depends on #26454, #26455 and #26456 because this causes more Domain methods to be resolved.

The issue was in resolving code like this:

class C {
  var x: int;
  var y: string;

  iter type myIter() {
    yield 3;
    yield 5;
    yield 7;
    yield 11;
  }
}

for i in C.myIter() do
  writeln(i);

Previously, dyno incorrectly set isMethod to be false, which made the this formal for methods to be incorrectly set. This PR adjusts this behavior to correctly track method calls when resolving iterator overloads.

Reviewed by @benharsh -- thanks!

Testing

  • dyno tests
  • paratest

@DanilaFe DanilaFe requested a review from benharsh January 6, 2025 19:28
@DanilaFe DanilaFe force-pushed the fix-iterator-methods branch from e151853 to b51c151 Compare January 8, 2025 00:18
@DanilaFe DanilaFe merged commit 6cfb93e into chapel-lang:main Jan 8, 2025
8 checks passed
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.

2 participants