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

Commit c82e3cc

Browse files
aloiret-edfredemmott
authored andcommitted
Add type hints to lambda parameters.
Summary: required for .hhconfig disallow_ambiguous_lambda. Signed-off-by: Arthur Loiret <[email protected]>
1 parent 306cd29 commit c82e3cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/TypeSpec/__Private/SetSpec.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class SetSpec<Tv as arraykey, T as \ConstSet<Tv>> extends TypeSpec<T> {
3737
}
3838

3939
$trace = $this->getTrace()->withFrame($this->what.'<T>');
40-
$map = $container ==>
40+
$map = (\ConstSet<arraykey> $container) ==>
4141
$container->map($v ==> $this->inner->withTrace($trace)->coerceType($v));
4242

4343
if (\is_a($value, $this->what)) {

src/TypeSpec/__Private/VectorSpec.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class VectorSpec<Tv, T as \ConstVector<Tv>> extends TypeSpec<T> {
3737
}
3838

3939
$trace = $this->getTrace()->withFrame($this->what.'<T>');
40-
$map = $container ==>
40+
$map = (\ConstVector<mixed> $container) ==>
4141
$container->map($v ==> $this->inner->withTrace($trace)->coerceType($v));
4242

4343
if (\is_a($value, $this->what)) {

0 commit comments

Comments
 (0)