File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 267
267
268
268
([ Giacomo Cavalieri] ( https://github.com/giacomocavalieri ) )
269
269
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
+
270
294
### Formatter
271
295
272
296
- The formatter now removes needless multiple negations that are safe to remove.
You can’t perform that action at this time.
0 commit comments