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 type information loss with const variable, fixes #5 #25

Merged
merged 2 commits into from
Jul 27, 2022

Conversation

Vindaar
Copy link
Member

@Vindaar Vindaar commented Jul 27, 2022

Finally fixes the underlying issue of #5. The problem was simply that our quick check if the input is UnitLess was flawed for const variables, as their node kind is still an nnkFloatLit.

The issue was that when parsing units the `isUnitLessNumber` check
failed to detect the unit of a `const`, as the variable node is still
a `nnkFloatLit`! Only asking for the type reveals the correct information.
@Vindaar Vindaar merged commit b63876c into master Jul 27, 2022
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

1 participant