Skip to content

Commit c3802a5

Browse files
committed
add fixture error demonstrating the stdlib parts being removed
1 parent bb870e9 commit c3802a5

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
We've found a bug for you!
3+
/.../fixtures/stdlib_removed_in_error.res:3:12-42
4+
5+
1 │ type x = Stdlib.Promise.t<int>
6+
2 │
7+
3 │ let x: x = Stdlib.Promise.resolve("hello")
8+
9+
This has type: Promise.t<string> (defined as promise<string>)
10+
But it's expected to have type: x (defined as promise<int>)
11+
12+
The incompatible parts:
13+
string vs int
14+
15+
You can convert string to int with Belt.Int.fromString.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
type x = Stdlib.Promise.t<int>
2+
3+
let x: x = Stdlib.Promise.resolve("hello")

0 commit comments

Comments
 (0)