Skip to content

Conversation

tlively
Copy link
Member

@tlively tlively commented Dec 4, 2019

No description provided.

@tlively tlively requested a review from kripken December 4, 2019 18:40

bool Function::isVar(Index index) { return index >= params.size(); }
bool Function::isVar(Index index) {
return params.size() <= index && index < params.size() + vars.size();
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be even better to assert that the index is in bounds, as the assumption in this API is "this is a valid local index, is it a var?" But we can leave that for separate consideration.

@tlively
Copy link
Member Author

tlively commented Dec 17, 2019

This ended up being merged as part of #2510.

@tlively tlively closed this Dec 17, 2019
@tlively tlively deleted the fix-isVar branch April 24, 2020 23:15
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