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

Commit 9847869

Browse files
lexidorjjergus
authored andcommitted
error_php_lambdas (#39)
1 parent d453d5f commit 9847869

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.hhconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ disallow_destruct = true
77
disallow_invalid_arraykey = true
88
disallow_stringish_magic = true
99
user_attributes=
10+
error_php_lambdas = true

src/TypeSpec/__Private/VecLikeArraySpec.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class VecLikeArraySpec<T> extends TypeSpec<array<T>> {
4040
}
4141

4242
$counter = (
43-
function(): \Generator<int, int, void> {
43+
(): \Generator<int, int, void> ==> {
4444
for ($i = 0; true; $i++) {
4545
yield $i;
4646
}

tests/TypeStructureTest.hack

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ final class TypeStructureTest extends \Facebook\HackTest\HackTest {
626626
public function testThrowsUnsupportedTypeForGenerators(): void {
627627
$ts = type_structure(TypeConstants::class, 'TIntTraversable');
628628
$generator = (
629-
function() {
629+
(): \Generator<int, int, void> ==> {
630630
yield 123;
631631
}
632632
)();
@@ -637,7 +637,7 @@ final class TypeStructureTest extends \Facebook\HackTest\HackTest {
637637

638638
$ts = type_structure(TypeConstants::class, 'TStringIntKeyedTraversable');
639639
$generator = (
640-
function() {
640+
(): \Generator<string, int, void> ==> {
641641
yield 'foo' => 123;
642642
}
643643
)();

0 commit comments

Comments
 (0)