Skip to content

Commit cd3e808

Browse files
committed
Fix build
1 parent a23d0ca commit cd3e808

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,16 @@
152152

153153
```txt
154154
error: Syntax error
155-
┌─ /src/parse/error.gleam:1:6
155+
┌─ /src/parse/error.gleam:2:12
156156
157-
1fn id<T>(x: T) { x }
158-
│ ^ I was expecting `(` here.
157+
2type Either<a, b> {
158+
^ I was expecting `(` here.
159159
160-
If you were trying to define a generic function, Gleam does not use angle brackets.
161-
Instead, you should write types in the parameter list with lower-case names.
162-
Each unique lower-case name becomes a type variable:
160+
Type parameters use lowercase names and are surrounded by parentheses.
163161
164-
fn example(arg: t) -> t
162+
type Either(a, b) {
165163
166-
See: https://tour.gleam.run/functions/generic-functions/
164+
See: https://tour.gleam.run/data-types/generic-custom-types/
167165
```
168166

169167
([Aaron Christiansen](https://github.com/AaronC81))

compiler-core/src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2584,7 +2584,7 @@ where
25842584
Err(ParseError {
25852585
error: ParseErrorType::TypeDefinitionAngleGenerics {
25862586
name: upname,
2587-
arguments: arguments,
2587+
arguments,
25882588
},
25892589
location: SrcSpan {
25902590
start: less_start,

0 commit comments

Comments
 (0)