gleam-lang/gleam

LSP: Renaming aliased value when alias has same name breaks alias

Fechada

#5.681 aberto em 3 de mai. de 2026

 (2 comentários) (0 reação) (0 responsável)Rust (960 forks)batch import
help wanted

Métricas do repositório

Stars
 (21.417 estrelas)
Métricas de merge de PR
 (Mesclagem média 10d 19h) (69 fundiu PRs em 30d)

Description

Sorry, I know the title is hard to understand. An example will make much more sense:

// foo.gleam
pub type Foo { Bar }
//             ^^^ (a)

// main.gleam
import foo.{Bar as Bar}
//      (b) ^^^    ^^^ (c)
pub fn main() {
    let _ = Bar
    //      ^^^ (d)
}

To reproduce: Move the cursor over (a) and trigger a rename to a new name.

Expected outcome: (a) and (b) change to the new value, (c) and (d) remain unchanged.

Actual outcome: (a), (b), and (d) change to the new value. (c) remains Bar. However, since (d) changes to the new value as well, the rename causes an unknown variable error at (d).

Gleam version: 1.16.0 OS: macOS Tahoe 26.4 (25E246) Editor: helix 25.07.1 (a05c151b)

Guia do colaborador