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(stdlib): Properly resize empty Queue on push #1865

Merged
merged 2 commits into from
Jun 25, 2023

Conversation

spotandjake
Copy link
Member

This fixes a tiny bug where if you did:

let q = Queue.makeSized(0)
Queue.push(1, q)

you would get an index out of range error.

Breaking because you will no longer recieve an exception.

@alex-snezhko
Copy link
Member

Could you add this fix for Stack too?

@phated phated changed the title fix(stdlib)!: Properly Resize Empty Queue On Push fix(stdlib): Properly resize empty Queue on push Jun 15, 2023
stdlib/queue.gr Outdated Show resolved Hide resolved
@phated phated added this pull request to the merge queue Jun 25, 2023
Merged via the queue into grain-lang:main with commit f7727ef Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants