Skip to content

Commit 03f077c

Browse files
committed
chore: add to CHANGELOG
1 parent 77ca211 commit 03f077c

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CHANGELOG.md

+24
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,30 @@
185185
- The compiler will not generate needless code for unused pattern variables.
186186
([Giacomo Cavalieri](https://github.com/giacomocavalieri))
187187

188+
- The compiler will now emit a warning when a function definition shadows
189+
an imported function with the same name.
190+
191+
```gleam
192+
import module.{fun}
193+
194+
fn fun() {}
195+
```
196+
197+
Will produce the following warning:
198+
199+
```
200+
warning: Definition of "fun" shadows an imported value
201+
┌─ /src/main.gleam:3:4
202+
203+
3 │ fn fun() {}
204+
│ ^^^
205+
206+
The imported value could not be used anyway.
207+
Hint: You could remove the imported value.
208+
```
209+
210+
([Ariel Parker](https://github.com/arielherself))
211+
188212
### Build tool
189213

190214
- The build tool now supports placing modules in a directory called `dev`,

0 commit comments

Comments
 (0)