Skip to content

Commit e6d3341

Browse files
GearsDatapackslpil
authored andcommitted
Changelog
1 parent 8ec66dc commit e6d3341

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,30 @@
267267

268268
([Giacomo Cavalieri](https://github.com/giacomocavalieri))
269269

270+
- The "Add type annotations" and "Generate function" code actions now ignore type
271+
variables defined in other functions, improving the generated code. For example:
272+
273+
```gleam
274+
fn something(a: a, b: b, c: c) -> d { todo }
275+
276+
fn pair(a, b) { #(a, b) }
277+
```
278+
279+
Previously, when triggering the "Add type annotations" code action on the
280+
`pair` function, the language server would have generated:
281+
282+
```gleam
283+
fn pair(a: e, b: f) -> #(e, f) { #(a, b) }
284+
```
285+
286+
However in 1.13, it will now generate:
287+
288+
```gleam
289+
fn pair(a: a, b: b) -> #(a, b) { #(a, b) }
290+
```
291+
292+
([Surya Rose](https://github.com/GearsDatapacks))
293+
270294
### Formatter
271295

272296
- The formatter now removes needless multiple negations that are safe to remove.

0 commit comments

Comments
 (0)