Skip to content

Commit afac86e

Browse files
Wilfredfacebook-github-bot
authored andcommitted
Print unresolved types as _
Summary: If we can't resolve a type variable, display it as "_" rather than "[unresolved]". This makes type errors easier to read. For example, if a user writes `await 1` we used to show: ``` -> Expected Awaitable<[unresolved]> -> But got int ``` The problem isn't that we couldn't find an inner type for `Awaitable`. The problem is that `1` isn't an awaitable value at all! We now show this: ``` -> Expected Awaitable<_> -> But got int ``` This is much easier to read, especially in larger types. It's also consistent with `Terr`. Reviewed By: hgoldstein Differential Revision: D39067882 fbshipit-source-id: 0e758cf36fe9c73f3b6347d7f53572fabeadeca3
1 parent 68b0b52 commit afac86e

File tree

104 files changed

+258
-258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+258
-258
lines changed

hphp/hack/src/typing/typing_print.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ module Full = struct
653653
if ISet.mem n' st then
654654
text "[rec]"
655655
else if !blank_tyvars then
656-
text "[unresolved]"
656+
text "_"
657657
else
658658
text ("#" ^ string_of_int n')
659659
in
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "yield_deeper.php", line 20, characters 3-45:
22
`await` can only operate on an `Awaitable` (Typing[4110])
33
File "yield_deeper.php", line 20, characters 3-45:
4-
Expected `Awaitable<[unresolved]>`
4+
Expected `Awaitable<_>`
55
File "yield_deeper.php", line 20, characters 9-45:
66
But got `AsyncGenerator<null, int, mixed>` (result of `async function` containing a `yield`)

hphp/hack/test/error_formatting_highlighted/position_within_position.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Typing[4110] await can only operate on an Awaitable [1]
2-
-> Expected Awaitable<[unresolved]> [1]
2+
-> Expected Awaitable<_> [1]
33
-> But got int [2]
44

55
position_within_position.php:4:3

hphp/hack/test/sound_dynamic/typing/generic_constraint_dynamic.bad.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Some type arguments violate their constraints (Typing[4323])
1313
File "generic_constraint_dynamic.bad.php", line 21, characters 14-20:
1414
Invalid argument (Typing[4110])
1515
File "generic_constraint_dynamic.bad.php", line 21, characters 12-12:
16-
Expected `~[unresolved]` because type parameter `T` of `C` could not be determined. Please add explicit type parameters to the invocation of `C`
16+
Expected `~_` because type parameter `T` of `C` could not be determined. Please add explicit type parameters to the invocation of `C`
1717
File "generic_constraint_dynamic.bad.php", line 6, characters 39-39:
1818
via this generic `T`
1919
File "generic_constraint_dynamic.bad.php", line 21, characters 18-18:

hphp/hack/test/sound_dynamic/typing/sound_dynamic_callable_1.bad.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Method `foo` in class `C` is not dynamically callable. (Typing[4110])
55
File "sound_dynamic_callable_1.bad.php", line 11, characters 27-34:
66
Expected `dynamic` because method must be callable in a dynamic context
77
File "sound_dynamic_callable_1.bad.php", line 12, characters 16-18:
8-
Type `Box<[unresolved]>` is not a subtype of `dynamic` under dynamic-aware subtyping
8+
Type `Box<_>` is not a subtype of `dynamic` under dynamic-aware subtyping

hphp/hack/test/sound_dynamic/typing/sound_dynamic_callable_1.bad.php.legacy_decl.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Method `foo` in class `C` is not dynamically callable. (Typing[4110])
55
File "sound_dynamic_callable_1.bad.php", line 11, characters 27-34:
66
Expected `dynamic` because method must be callable in a dynamic context
77
File "sound_dynamic_callable_1.bad.php", line 12, characters 16-18:
8-
Type `Box<[unresolved]>` is not a subtype of `dynamic` under dynamic-aware subtyping
8+
Type `Box<_>` is not a subtype of `dynamic` under dynamic-aware subtyping

hphp/hack/test/sound_dynamic/typing/sound_dynamic_callable_2.bad.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Method `foo` in class `C` is not dynamically callable. (Typing[4110])
55
File "sound_dynamic_callable_2.bad.php", line 10, characters 27-34:
66
Expected `dynamic` because method must be callable in a dynamic context
77
File "sound_dynamic_callable_2.bad.php", line 11, characters 16-18:
8-
Type `Box<[unresolved]>` is not a subtype of `dynamic` under dynamic-aware subtyping
8+
Type `Box<_>` is not a subtype of `dynamic` under dynamic-aware subtyping

hphp/hack/test/sound_dynamic/typing/sound_dynamic_callable_2.bad.php.legacy_decl.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Method `foo` in class `C` is not dynamically callable. (Typing[4110])
55
File "sound_dynamic_callable_2.bad.php", line 10, characters 27-34:
66
Expected `dynamic` because method must be callable in a dynamic context
77
File "sound_dynamic_callable_2.bad.php", line 11, characters 16-18:
8-
Type `Box<[unresolved]>` is not a subtype of `dynamic` under dynamic-aware subtyping
8+
Type `Box<_>` is not a subtype of `dynamic` under dynamic-aware subtyping

hphp/hack/test/sound_dynamic/typing/supportdyn.bad.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Invalid `foreach` (Typing[4110])
5555
File "supportdyn.bad.php", line 21, characters 3-11:
5656
`await` can only operate on an `Awaitable` (Typing[4110])
5757
File "supportdyn.bad.php", line 21, characters 3-11:
58-
Expected `Awaitable<[unresolved]>`
58+
Expected `Awaitable<_>`
5959
File "supportdyn.bad.php", line 18, characters 32-38:
6060
But got `nonnull`
6161
File "supportdynamic.hhi", line 6, characters 29-29:

hphp/hack/test/sound_dynamic/typing/supportdynamic.bad.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Invalid `foreach` (Typing[4110])
5555
File "supportdynamic.bad.php", line 18, characters 3-11:
5656
`await` can only operate on an `Awaitable` (Typing[4110])
5757
File "supportdynamic.bad.php", line 18, characters 3-11:
58-
Expected `Awaitable<[unresolved]>`
58+
Expected `Awaitable<_>`
5959
File "supportdynamic.bad.php", line 15, characters 32-38:
6060
But got `nonnull`
6161
File "supportdynamic.hhi", line 6, characters 29-29:

hphp/hack/test/typecheck/akempty/akempty_promotion_4.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Invalid argument (Typing[4110])
33
File "akempty_promotion_4.php", line 12, characters 24-26:
44
Expected `int`
55
File "akempty_promotion_4.php", line 7, characters 17-24:
6-
But got `vec<(string | [unresolved])>`
6+
But got `vec<(string | _)>`

hphp/hack/test/typecheck/anon13.php.pess_exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Invalid return type (Typing[4110])
33
File "anon13.php.pess", line 16, characters 18-59:
44
Expected `~Vector<supportdyn<(function(int): ~int)>>`
55
File "anon13.php.pess", line 17, characters 8-62:
6-
But got `Vector<supportdyn<(function([unresolved] $x): [unresolved])>>`
6+
But got `Vector<supportdyn<(function(_ $x): _)>>`

hphp/hack/test/typecheck/anyarray_bad.php.exp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ Invalid argument (Typing[4110])
55
File "anyarray_bad.php", line 3, characters 22-39:
66
Expected `AnyArray<int, int>`
77
File "anyarray_bad.php", line 10, characters 15-20:
8-
But got `Map<[unresolved], [unresolved]>`
8+
But got `Map<_, _>`
99
File "anyarray_bad.php", line 11, characters 15-20:
1010
Invalid argument (Typing[4110])
1111
File "anyarray_bad.php", line 3, characters 22-39:
1212
Expected `AnyArray<int, int>`
1313
File "anyarray_bad.php", line 11, characters 15-20:
14-
But got `Set<[unresolved]>`
14+
But got `Set<_>`
1515
File "anyarray_bad.php", line 12, characters 15-26:
1616
Invalid argument (Typing[4110])
1717
File "anyarray_bad.php", line 3, characters 22-39:
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
11
File "unpack_call1.php", line 38, characters 8-12:
22
Invalid argument (Typing[4359])
3-
File "unpack_call1.php", line 38, characters 8-12:
4-
An array cannot be unpacked into the required arguments of a function
5-
File "unpack_call1.php", line 3, characters 10-10:
6-
Definition is here
3+
File "unpack_call1.php", line 38, characters 8-12:
4+
An array cannot be unpacked into the required arguments of a function
5+
File "unpack_call1.php", line 3, characters 10-10:
6+
Definition is here
77
File "unpack_call1.php", line 39, characters 21-25:
88
Invalid argument (Typing[4359])
9-
File "unpack_call1.php", line 39, characters 21-25:
10-
An array cannot be unpacked into the required arguments of a function
11-
File "unpack_call1.php", line 8, characters 19-29:
12-
Definition is here
9+
File "unpack_call1.php", line 39, characters 21-25:
10+
An array cannot be unpacked into the required arguments of a function
11+
File "unpack_call1.php", line 8, characters 19-29:
12+
Definition is here
1313
File "unpack_call1.php", line 40, characters 15-19:
1414
Invalid argument (Typing[4359])
15-
File "unpack_call1.php", line 40, characters 15-19:
16-
An array cannot be unpacked into the required arguments of a function
17-
File "unpack_call1.php", line 12, characters 19-19:
18-
Definition is here
15+
File "unpack_call1.php", line 40, characters 15-19:
16+
An array cannot be unpacked into the required arguments of a function
17+
File "unpack_call1.php", line 12, characters 19-19:
18+
Definition is here
1919
File "unpack_call1.php", line 41, characters 21-25:
2020
Invalid argument (Typing[4359])
21-
File "unpack_call1.php", line 41, characters 21-25:
22-
An array cannot be unpacked into the required arguments of a function
23-
File "unpack_call1.php", line 16, characters 19-29:
24-
Definition is here
21+
File "unpack_call1.php", line 41, characters 21-25:
22+
An array cannot be unpacked into the required arguments of a function
23+
File "unpack_call1.php", line 16, characters 19-29:
24+
Definition is here
2525
File "unpack_call1.php", line 42, characters 15-19:
2626
Invalid argument (Typing[4359])
27-
File "unpack_call1.php", line 42, characters 15-19:
28-
An array cannot be unpacked into the required arguments of a function
29-
File "unpack_call1.php", line 12, characters 19-19:
30-
Definition is here
27+
File "unpack_call1.php", line 42, characters 15-19:
28+
An array cannot be unpacked into the required arguments of a function
29+
File "unpack_call1.php", line 12, characters 19-19:
30+
Definition is here
3131
File "unpack_call1.php", line 51, characters 8-22:
3232
Invalid argument (Typing[4359])
33-
File "unpack_call1.php", line 51, characters 8-22:
34-
An array cannot be unpacked into the required arguments of a function
35-
File "unpack_call1.php", line 3, characters 10-10:
36-
Definition is here
33+
File "unpack_call1.php", line 51, characters 8-22:
34+
An array cannot be unpacked into the required arguments of a function
35+
File "unpack_call1.php", line 3, characters 10-10:
36+
Definition is here
3737
File "unpack_call1.php", line 53, characters 8-14:
3838
Invalid argument (Typing[4359])
39-
File "unpack_call1.php", line 53, characters 8-14:
40-
An array cannot be unpacked into the required arguments of a function
41-
File "unpack_call1.php", line 3, characters 10-10:
42-
Definition is here
39+
File "unpack_call1.php", line 53, characters 8-14:
40+
An array cannot be unpacked into the required arguments of a function
41+
File "unpack_call1.php", line 3, characters 10-10:
42+
Definition is here
4343
File "unpack_call1.php", line 69, characters 8-12:
4444
Invalid argument (Typing[4359])
45-
File "unpack_call1.php", line 69, characters 8-12:
46-
An array cannot be unpacked into the required arguments of a function
47-
File "unpack_call1.php", line 3, characters 10-10:
48-
Definition is here
45+
File "unpack_call1.php", line 69, characters 8-12:
46+
An array cannot be unpacked into the required arguments of a function
47+
File "unpack_call1.php", line 3, characters 10-10:
48+
Definition is here
4949
File "unpack_call1.php", line 75, characters 8-12:
5050
Invalid argument (Typing[4359])
51-
File "unpack_call1.php", line 75, characters 8-12:
52-
An array cannot be unpacked into the required arguments of a function
53-
File "unpack_call1.php", line 3, characters 10-10:
54-
Definition is here
51+
File "unpack_call1.php", line 75, characters 8-12:
52+
An array cannot be unpacked into the required arguments of a function
53+
File "unpack_call1.php", line 3, characters 10-10:
54+
Definition is here
5555
File "unpack_call1.php", line 85, characters 8-19:
5656
Invalid argument (Typing[4110])
57-
File "unpack_call1.php", line 85, characters 8-19:
58-
Expected `Traversable<[unresolved]>` (it is unpacked with `...`)
59-
File "unpack_call1.php", line 90, characters 24-28:
60-
But got `mixed`
57+
File "unpack_call1.php", line 85, characters 8-19:
58+
Expected `Traversable<_>` (it is unpacked with `...`)
59+
File "unpack_call1.php", line 90, characters 24-28:
60+
But got `mixed`
6161
File "unpack_call1.php", line 87, characters 8-14:
6262
Invalid argument (Typing[4110])
63-
File "unpack_call1.php", line 87, characters 8-14:
64-
Expected `Traversable<[unresolved]>` (it is unpacked with `...`)
65-
File "unpack_call1.php", line 90, characters 24-28:
66-
But got `mixed`
63+
File "unpack_call1.php", line 87, characters 8-14:
64+
Expected `Traversable<_>` (it is unpacked with `...`)
65+
File "unpack_call1.php", line 90, characters 24-28:
66+
But got `mixed`
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "unpack_call3.php", line 7, characters 8-12:
22
Invalid argument (Typing[4110])
3-
File "unpack_call3.php", line 7, characters 8-12:
4-
Expected `Traversable<[unresolved]>` (it is unpacked with `...`)
5-
File "unpack_call3.php", line 6, characters 11-18:
6-
But got `string`
3+
File "unpack_call3.php", line 7, characters 8-12:
4+
Expected `Traversable<_>` (it is unpacked with `...`)
5+
File "unpack_call3.php", line 6, characters 11-18:
6+
But got `string`
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "unpack_call6.php", line 12, characters 13-17:
22
Invalid argument (Typing[4110])
3-
File "unpack_call6.php", line 12, characters 13-17:
4-
Expected `Traversable<[unresolved]>` (it is unpacked with `...`)
5-
File "unpack_call6.php", line 11, characters 11-18:
6-
But got `string`
3+
File "unpack_call6.php", line 12, characters 13-17:
4+
Expected `Traversable<_>` (it is unpacked with `...`)
5+
File "unpack_call6.php", line 11, characters 11-18:
6+
But got `string`
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "unpack_call_mixed.php", line 5, characters 9-13:
22
Typing error (Typing[4110])
33
File "unpack_call_mixed.php", line 5, characters 9-13:
4-
Expected `Traversable<[unresolved]>` (it is unpacked with `...`)
4+
Expected `Traversable<_>` (it is unpacked with `...`)
55
File "unpack_call_mixed.php", line 3, characters 25-35:
66
But got `?vec<mixed>`

hphp/hack/test/typecheck/arithmetic_any.php.exp

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ File "arithmetic_any.php--file2.php", line 58, characters 3-13:
2323
File "arithmetic_any.php--file2.php", line 63, characters 3-13:
2424
_
2525
File "arithmetic_any.php--file2.php", line 75, characters 35-45:
26-
[unresolved]
26+
_
2727
File "arithmetic_any.php--file2.php", line 75, characters 48-58:
28-
[unresolved]
28+
_
2929
File "arithmetic_any.php--file2.php", line 84, characters 3-13:
3030
_
3131
File "arithmetic_any.php--file2.php", line 89, characters 3-13:

hphp/hack/test/typecheck/array/safe_vector_array/disallows_array_of_int_when_array_of_tk_to_tv_is_required.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Some type arguments violate their constraints (Typing[4323])
1111
File "disallows_array_of_int_when_array_of_tk_to_tv_is_required.php", line 6, characters 24-34:
1212
Invalid argument (Typing[4110])
1313
File "disallows_array_of_int_when_array_of_tk_to_tv_is_required.php", line 3, characters 39-52:
14-
Expected `dict<[unresolved], [unresolved]>`
14+
Expected `dict<_, _>`
1515
File "disallows_array_of_int_when_array_of_tk_to_tv_is_required.php", line 5, characters 15-25:
1616
But got `vec<int>`

hphp/hack/test/typecheck/array_append_set_bad.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Invalid assignment (Typing[4110])
77
File "array_append_set_bad.php", line 20, characters 3-12:
88
Set values must be arraykeys (Typing[4324])
99
File "array_append_set_bad.php", line 19, characters 8-12:
10-
This container is an object of type Set<[unresolved]>
10+
This container is an object of type Set<_>
1111
File "array_append_set_bad.php", line 20, characters 10-12:
1212
A float is not an arraykey

hphp/hack/test/typecheck/array_sub.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Some type arguments violate their constraints (Typing[4323])
1111
File "array_sub.php", line 21, characters 12-13:
1212
Invalid argument (Typing[4110])
1313
File "array_sub.php", line 12, characters 27-40:
14-
Expected `dict<[unresolved], [unresolved]>`
14+
Expected `dict<_, _>`
1515
File "array_sub.php", line 20, characters 15-25:
1616
But got `vec<int>`

hphp/hack/test/typecheck/array_sub2.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Some type arguments violate their constraints (Typing[4323])
1111
File "array_sub2.php", line 21, characters 12-13:
1212
Invalid argument (Typing[4110])
1313
File "array_sub2.php", line 12, characters 23-38:
14-
Expected `dict<bool, [unresolved]>`
14+
Expected `dict<bool, _>`
1515
File "array_sub2.php", line 20, characters 15-25:
1616
But got `vec<int>`

hphp/hack/test/typecheck/assign_unresolved_obj_get.php.tast_typecheck_exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
(Binop ((Eq None), (([14:3-5], C), (Lvar ([14:3-5], $c))),
4848
(([14:8-20], C),
4949
(New (
50-
(([14:12-13], C<[unresolved]>),
50+
(([14:12-13], C<_>),
5151
(CI (([14:12-13], "\\C"), []))),
5252
[(([14:14-19], (float | num | int)),
5353
(Lvar ([14:14-19], $xory)))],
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "await_as_an_expression_awaiting_non_awaitable.php", line 7, characters 17-22:
22
`await` can only operate on an `Awaitable` (Typing[4110])
3-
File "await_as_an_expression_awaiting_non_awaitable.php", line 7, characters 17-22:
4-
Expected `Awaitable<[unresolved]>`
5-
File "await_as_an_expression_awaiting_non_awaitable.php", line 3, characters 18-20:
6-
But got `int`
3+
File "await_as_an_expression_awaiting_non_awaitable.php", line 7, characters 17-22:
4+
Expected `Awaitable<_>`
5+
File "await_as_an_expression_awaiting_non_awaitable.php", line 3, characters 18-20:
6+
But got `int`

hphp/hack/test/typecheck/await_on_illegal_value.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ Invalid return type (Typing[4336])
99
File "await_on_illegal_value.php", line 13, characters 3-10:
1010
`await` can only operate on an `Awaitable` (Typing[4110])
1111
File "await_on_illegal_value.php", line 13, characters 3-10:
12-
Expected `Awaitable<[unresolved]>`
12+
Expected `Awaitable<_>`
1313
File "await_on_illegal_value.php", line 13, characters 9-10:
1414
But got `int`
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
File "await_new_precedence.php", line 10, characters 14-15:
22
This expression is of type `Awaitable`, but it's either being discarded or used in a dangerous way before being awaited (Typing[4015])
3-
File "await_new_precedence.php", line 8, characters 40-54:
4-
This is why I think it is `Awaitable`
3+
File "await_new_precedence.php", line 8, characters 40-54:
4+
This is why I think it is `Awaitable`
55
File "await_new_precedence.php", line 10, characters 19-20:
66
This expression is of type `Awaitable`, but it's either being discarded or used in a dangerous way before being awaited (Typing[4015])
7-
File "await_new_precedence.php", line 8, characters 60-74:
8-
This is why I think it is `Awaitable`
7+
File "await_new_precedence.php", line 8, characters 60-74:
8+
This is why I think it is `Awaitable`
99
File "await_new_precedence.php", line 20, characters 3-30:
1010
This expression is of type `Awaitable`, but it's either being discarded or used in a dangerous way before being awaited (Typing[4015])
11-
File "await_new_precedence.php", line 17, characters 35-46:
12-
This is why I think it is `Awaitable`
11+
File "await_new_precedence.php", line 17, characters 35-46:
12+
This is why I think it is `Awaitable`
1313
File "await_new_precedence.php", line 20, characters 18-19:
1414
Invalid argument (Typing[4110])
15-
File "await_new_precedence.php", line 17, characters 16-27:
16-
Expected `Awaitable<[unresolved]>`
17-
File "await_new_precedence.php", line 19, characters 30-32:
18-
But got `int`
15+
File "await_new_precedence.php", line 17, characters 16-27:
16+
Expected `Awaitable<_>`
17+
File "await_new_precedence.php", line 19, characters 30-32:
18+
But got `int`
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
File "await_old_precedence.php", line 10, characters 14-15:
22
This expression is of type `Awaitable`, but it's either being discarded or used in a dangerous way before being awaited (Typing[4015])
3-
File "await_old_precedence.php", line 8, characters 40-54:
4-
This is why I think it is `Awaitable`
3+
File "await_old_precedence.php", line 8, characters 40-54:
4+
This is why I think it is `Awaitable`
55
File "await_old_precedence.php", line 10, characters 19-20:
66
This expression is of type `Awaitable`, but it's either being discarded or used in a dangerous way before being awaited (Typing[4015])
7-
File "await_old_precedence.php", line 8, characters 60-74:
8-
This is why I think it is `Awaitable`
7+
File "await_old_precedence.php", line 8, characters 60-74:
8+
This is why I think it is `Awaitable`
99
File "await_old_precedence.php", line 20, characters 3-30:
1010
This expression is of type `Awaitable`, but it's either being discarded or used in a dangerous way before being awaited (Typing[4015])
11-
File "await_old_precedence.php", line 17, characters 35-46:
12-
This is why I think it is `Awaitable`
11+
File "await_old_precedence.php", line 17, characters 35-46:
12+
This is why I think it is `Awaitable`
1313
File "await_old_precedence.php", line 20, characters 18-19:
1414
Invalid argument (Typing[4110])
15-
File "await_old_precedence.php", line 17, characters 16-27:
16-
Expected `Awaitable<[unresolved]>`
17-
File "await_old_precedence.php", line 19, characters 30-32:
18-
But got `int`
15+
File "await_old_precedence.php", line 17, characters 16-27:
16+
Expected `Awaitable<_>`
17+
File "await_old_precedence.php", line 19, characters 30-32:
18+
But got `int`
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
File "concurrent_non_awaitable.php", line 8, characters 16-20:
22
`await` can only operate on an `Awaitable` (Typing[4110])
3-
File "concurrent_non_awaitable.php", line 8, characters 16-20:
4-
Expected `Awaitable<[unresolved]>`
5-
File "concurrent_non_awaitable.php", line 3, characters 17-19:
6-
But got `int`
3+
File "concurrent_non_awaitable.php", line 8, characters 16-20:
4+
Expected `Awaitable<_>`
5+
File "concurrent_non_awaitable.php", line 3, characters 17-19:
6+
But got `int`

hphp/hack/test/typecheck/continuation_is_not_awaitable2.php.exp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Invalid return type (Typing[4110])
33
File "continuation_is_not_awaitable2.php", line 12, characters 17-30:
44
Expected `Awaitable<int>`
55
File "continuation_is_not_awaitable2.php", line 12, characters 17-30:
6-
But got `Generator<[unresolved], [unresolved], [unresolved]>` (result of function containing a `yield`)
6+
But got `Generator<_, _, _>` (result of function containing a `yield`)

0 commit comments

Comments
 (0)