⭐️ A friendly language for building type-safe, scalable systems!

CHANGELOG

authored by giacomocavalieri.me and committed by Louis Pilfold 9e64f324 2979a3b9

Changed files
+32 -2
+32 -2
CHANGELOG.md
··· 44 44 45 45 ([Zij-IT](https://github.com/zij-it)) 46 46 47 - - The compiler now emits a warning when a top-level constant or function declaration 48 - shadows an imported name in the current module. 47 + - The compiler now emits a warning when a top-level constant or function 48 + declaration shadows an imported name in the current module. 49 49 ([Aayush Tripathi](https://github.com/aayush-tripathi)) 50 50 51 51 - The compiler can now tell when an unknown variable might be referring to an ··· 73 73 Hint: Change `_x` to `x` or reference another variable 74 74 ``` 75 75 76 + ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 77 + 78 + - When using two spreads, trying to concatenate lists, the compiler will now 79 + show a nicer error message. For example, this snippet of code: 80 + 81 + ```gleam 82 + pub fn main() -> Nil { 83 + let xs = [1, 2, 3] 84 + let ys = [5, 6, 7] 85 + [1, ..xs, ..ys] 86 + } 87 + ``` 88 + 89 + Would result in the following error: 90 + 91 + ``` 92 + error: Syntax error 93 + ┌─ /src/parse/error.gleam:5:13 94 + 95 + 5 │ [1, ..xs, ..ys] 96 + │ -- ^^ I wasn't expecting a second spread here 97 + │ │ 98 + │ You're using a spread here 99 + 100 + Lists are immutable and singly-linked, so to join two or more lists 101 + all the elements of the lists would need to be copied into a new list. 102 + This would be slow, so there is no built-in syntax for it. 103 + ``` 104 + 105 + ([Carl Bordum Hansen](https://github.com/carlbordum)) and 76 106 ([Giacomo Cavalieri](https://github.com/giacomocavalieri)) 77 107 78 108 ### Build tool