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

Refactor the StructConstructor #2777

Closed
tanay-man opened this issue Jul 16, 2024 · 0 comments · Fixed by #2795
Closed

Refactor the StructConstructor #2777

tanay-man opened this issue Jul 16, 2024 · 0 comments · Fixed by #2795

Comments

@tanay-man
Copy link
Contributor

tanay-man commented Jul 16, 2024

Currently :

p1 : Class = Class(1,2)
#transformed into in the ASR
p1: Class = Class()
p1___init__(p1, 1, 2)

Instead in the ASR it should be kept as :

p1 : Class = Class(1, 2) #Structconstructor

and in the ASR-> ASR pass ClassConstructor replace as

p1: Class
p1___init__(p1, 1, 2)

Also add the parameters original_name and dt(p1 here) to the subroutine that is being called.

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 a pull request may close this issue.

1 participant