Skip to content

"invalid context for '^' as '" error when trying to access results of toSeq() using ranges #6974

@dawkot

Description

@dawkot
import sequtils

iterator it: int = 
    yield 2; yield 4

for x in toSeq(it())[0..^1]: #invalid context for '^' as '
    discard

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions