Skip to content

variable leakage out of for loop #1905

@tw4452852

Description

@tw4452852

What happened, and what did you expect to happen?

~> put $i
Compilation error: variable $i not found
  [tty 162]:1:5-6: put $i
~> for i [1 2] { nop }
~> put $i
▶ 2

i should only be valid inside for loop.

Output of "elvish -version"

0.21.0

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ❓Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions