Skip to content

Remove ttype enum_type from EnumName and EnumValue #1133

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

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

czgdp1807
Copy link
Collaborator

Implements #1117 (comment)

@czgdp1807 czgdp1807 marked this pull request as ready for review September 22, 2022 06:21
@czgdp1807 czgdp1807 enabled auto-merge (squash) September 22, 2022 06:22
@czgdp1807 czgdp1807 merged commit 245eb5c into lcompilers:main Sep 22, 2022
}
ASR::symbol_t* enum_type_cand = ASR::down_cast<ASR::symbol_t>(s_var->m_parent_symtab->asr_owner);
LFORTRAN_ASSERT(ASR::is_a<ASR::EnumType_t>(*enum_type_cand));
return ASR::down_cast<ASR::EnumType_t>(enum_type_cand);
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR is fine. Keeping the type in EnumName/Value would simplify this function, but otherwise it seems it's not needed that much.

I still don't like how complicated this function is, it feels like we are lumping together some unrelated things.

@certik
Copy link
Contributor

certik commented Sep 23, 2022

Thanks!

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