Skip to content

Conversation

@namannimmo10
Copy link
Collaborator

No description provided.

@namannimmo10
Copy link
Collaborator Author

I think you're right, we definitely need to implement a generic abs function, so as to generate the correct ASR.

@namannimmo10
Copy link
Collaborator Author

I will decorate the abs with overload (as added in #166) and get this PR merged soon.

@certik
Copy link
Contributor

certik commented Mar 2, 2022

Overloads don't work in LPython yet, see #187.

Comment on lines +101 to +102
ASR::ttype_t *int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, loc, 4, nullptr, 0));
ASR::ttype_t *real_type = ASRUtils::TYPE(ASR::make_Real_t(al, loc, 8, nullptr, 0));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we take the kind from args[0]'s type instead of defaulting it to 8 or 4?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we should, perhaps everywhere in the codebase.

@namannimmo10
Copy link
Collaborator Author

This was included in #250. Thanks!

@namannimmo10 namannimmo10 deleted the builtin7 branch March 22, 2022 08:34
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.

3 participants