Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 82628aa

Browse files
author
Iwan
committed
Update for jest snapshots for spread
1 parent d58c193 commit 82628aa

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

tests/parsing/errors/other/__snapshots__/parse.spec.js.snap

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ let x::y = myList
169169
type nonrec t = < a >
170170
type nonrec t =
171171
| Foo of < a >
172+
type nonrec t = (foo, < x > ) option
172173
=====Errors=============================================
173174
174175
Syntax error!
@@ -235,19 +236,30 @@ Explanation: a list spread at the tail is efficient, but a spread in the middle
235236
9 │
236237
10 │ type t = {...a}
237238
11 │ type t = Foo({...a})
238-
12 │
239+
12 │ type t = option<foo, {...x}>
239240
240-
The … spread is only supported for record value update and object type declaration.
241+
You're using a ... spread without extra fields. This is the same type.
241242
242243
243244
Syntax error!
244245
parsing/errors/other/spread.res:11:15-17
245246
9 │
246247
10 │ type t = {...a}
247248
11 │ type t = Foo({...a})
248-
12 │
249+
12 │ type t = option<foo, {...x}>
250+
13 │
249251
250-
The … spread is only supported for record value update and object type declaration.
252+
You're using a ... spread without extra fields. This is the same type.
253+
254+
255+
Syntax error!
256+
parsing/errors/other/spread.res:12:23-26
257+
10 │ type t = {...a}
258+
11 │ type t = Foo({...a})
259+
12 │ type t = option<foo, {...x}>
260+
13 │
261+
262+
You're using a ... spread without extra fields. This is the same type.
251263
252264
253265
========================================================"

0 commit comments

Comments
 (0)