0xMiden / 0xMiden/air-script

Forbid name shadowing on comprehensions

Aberta
#273 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Rust
Estrelas
96
Forks
39
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

The following expression is currently allowed [ref](https://github.com/0xPolygonMiden/air-script/blob/next/air-script-core/src/access.rs#L106):

```
[x + y + z for (x, y, z) in (x, 0..5, z[1..6])]
```

In the case above, the variable `x` with the iterable is shadowed with the yielded values `x`. This can be confusing at times, and may make sense to disallow that, requiring the user to be explicit and write something like:

```
[x_ + y + z for (x_, y, z) in (x, 0..5, z[1..6])]
```

The idea is to be explicit and hopefully prevent bugs.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.