Skip to content

Commit

Permalink
Fix incorrect codegen type
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed May 9, 2023
1 parent 05703b0 commit 3d84003
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/BuildSchemaCLI.php
Expand Up @@ -87,7 +87,7 @@ public static function getRenderedHackTableSchemaWithClusters(
$file_contents .= "use type Slack\\SQLFake\\{Column, DataType, Index, TableSchema};\n";
$file_contents .= "\n";
$file_contents .= "<<__Memoize>>\n";
$file_contents .= "function {$function_name}(): dict<string, dict<string, table_schema>> {\n";
$file_contents .= "function {$function_name}(): dict<string, dict<string, TableSchema>> {\n";
$file_contents .= "\treturn dict[\n";
foreach ($table_schemas as $cluster => $tables) {
$file_contents .= "\t\t'{$cluster}' => ".self::getRenderedHackTableSchema($tables, "\t\t");
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/expected_schema.codegen
@@ -1,7 +1,7 @@
use type Slack\SQLFake\{Column, DataType, Index, TableSchema};

<<__Memoize>>
function get_my_table_schemas(): dict<string, dict<string, table_schema>> {
function get_my_table_schemas(): dict<string, dict<string, TableSchema>> {
return dict[
'prod' => dict[
'test' => new TableSchema(
Expand Down

0 comments on commit 3d84003

Please sign in to comment.