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

Resolve a compiler hang when reporting a split init error #21692

Merged
merged 2 commits into from Feb 27, 2023

Conversation

mppf
Copy link
Member

@mppf mppf commented Feb 24, 2023

This PR is intended to resolve a compiler hang discussed in this Discourse thread.

There were two problems:

  1. There was an error in the code looking for a user variable that led to infinite looping.
  2. Split init checking was firing for passing a generic type to a function, but passing a generic type to a type formal is OK

This PR fixes those problems and adds the reproducer as a test.

Reviewed by @vasslitvinov - thanks!

  • full local futures testing

---
Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
Copy link
Member

@vasslitvinov vasslitvinov left a comment

Choose a reason for hiding this comment

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

I would prefer the calculation of isTypeVariable as a standalone static function, however I can live with this code as-is. Looks good otherwise.

---
Signed-off-by: Michael Ferguson <mppf@users.noreply.github.com>
@mppf mppf changed the title Resolve an compiler hang when reporting a split init error Resolve n compiler hang when reporting a split init error Feb 27, 2023
@mppf mppf changed the title Resolve n compiler hang when reporting a split init error Resolve a compiler hang when reporting a split init error Feb 27, 2023
@mppf mppf merged commit 3478ab8 into chapel-lang:main Feb 27, 2023
@mppf mppf deleted the resolve-infinite-loop-split-init-err branch February 27, 2023 15:28
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