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

Fix: Support for self-referencing procedure declaration #5775

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

jinangshah21
Copy link
Contributor

@jinangshah21 jinangshah21 commented Dec 20, 2024

Towards #5774
Fixes #5735

Copy link
Member

@kmr-srbh kmr-srbh left a comment

Choose a reason for hiding this comment

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

We visit a self referencing procedure after we declare the subroutine/function in the parent scope. The changes look good. Thanks for doing this!

@certik certik changed the title Fix: Support for self referencing prodcedure declaration Fix: Support for self referencing procedure declaration Dec 20, 2024
@certik certik changed the title Fix: Support for self referencing procedure declaration Fix: Support for self-referencing procedure declaration Dec 20, 2024
Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

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

I think this is fine. Does this work when saved in a module (.mod) file and loaded? To ensure the ASR can be properly serialized / deserialized and all these recursive references resolved.

@certik certik merged commit e6c1dbe into lfortran:main Dec 20, 2024
27 checks passed
@jinangshah21
Copy link
Contributor Author

I think this is fine. Does this work when saved in a module (.mod) file and loaded? To ensure the ASR can be properly serialized / deserialized and all these recursive references resolved.

Yes when I put module in other file and use it in different file, it works properly.

@certik
Copy link
Contributor

certik commented Dec 20, 2024

Perfect!

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.

bug: self-referencing procedure pointers not supported
3 participants