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

Inline filter for toSeq causes deadloop #3

Open
litlighilit opened this issue Jun 11, 2024 · 0 comments
Open

Inline filter for toSeq causes deadloop #3

litlighilit opened this issue Jun 11, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@litlighilit
Copy link
Collaborator

litlighilit commented Jun 11, 2024

Desc

import pylib
import std/sequtils
discard filter(None, [1,0,3]).toSeq  # <-- deadloop here

Version

Nim: any
pylib: 0.9.0

Possible Solution

There is a workaround, see below.

Additional Info

If using closure, then everthing is fine:

let filt = filter(None, [1, 0, 3])
discard filt.toSeq
@litlighilit litlighilit added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jun 11, 2024
@litlighilit litlighilit changed the title bug: repr for self contained list/dict deadloop repr for self contained list/dict deadloop Jun 11, 2024
@litlighilit litlighilit changed the title repr for self contained list/dict deadloop Inline filter for toSeq causes deadloop Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant