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

Commit 329ed4b

Browse files
authored
fix array vs varray issue (#16)
`varray<string>` would be accurate, but I figured `KeyedContainer` is safer in case someone's using this with a `darray` somehow, or if we decide to migrate to `vec` eventually.
1 parent 84e7c55 commit 329ed4b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/RouterCLILookupCodegenBuilder.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ final class RouterCLILookupCodegenBuilder {
207207

208208
private function getMainMethod(): CodegenMethod {
209209
return $this->cg->codegenMethod('main')
210-
->addParameter('array<string> $argv')
210+
->addParameter('KeyedContainer<int, string> $argv')
211211
->setReturnType('void')
212212
->setBody(
213213
$this->cg->codegenHackBuilder()

tests/examples/codegen/lookup-path.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* To re-generate this file run vendor/hhvm/hacktest/bin/hacktest
88
*
99
*
10-
* @partially-generated SignedSource<<dcbaf7d5f4a45c2c3e92a2b822b556d2>>
10+
* @partially-generated SignedSource<<584ccd4103e1cb5ddaa5cdc80ba52017>>
1111
*/
1212
namespace Facebook\HackRouter\CodeGen\Tests\Generated;
1313
/* BEGIN MANUAL SECTION init */
@@ -67,7 +67,7 @@ private function getControllersForPath(
6767
}
6868
}
6969

70-
public function main(array<string> $argv): void {
70+
public function main(KeyedContainer<int, string> $argv): void {
7171
$path = $argv[1] ?? null;
7272
if ($path === null) {
7373
\fprintf(\STDERR, "Usage: %s PATH\n", $argv[0]);

0 commit comments

Comments
 (0)