Skip to content

Commit

Permalink
Back out "Add Float and Int type support for Android modules" (facebo…
Browse files Browse the repository at this point in the history
…ok#45024)

Summary:
Original commit changeset: 32b3bbdf5fd2

Fixes facebook#44963
Closes facebook#45024

Original Phabricator Diff: D52420921

Reviewed By: dmytrorykun

Differential Revision: D58820544
  • Loading branch information
cortinico authored and facebook-github-bot committed Jun 20, 2024
1 parent 75451d5 commit 5ac21d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ function translateFunctionParamToJavaType(
case 'NumberTypeAnnotation':
return wrapOptional('double', isRequired);
case 'FloatTypeAnnotation':
return wrapOptional('float', isRequired);
return wrapOptional('double', isRequired);
case 'DoubleTypeAnnotation':
return wrapOptional('double', isRequired);
case 'Int32TypeAnnotation':
return wrapOptional('int', isRequired);
return wrapOptional('double', isRequired);
case 'BooleanTypeAnnotation':
return wrapOptional('boolean', isRequired);
case 'EnumDeclaration':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ function translateReturnTypeToJniType(
case 'DoubleTypeAnnotation':
return nullable ? 'Ljava/lang/Double;' : 'D';
case 'FloatTypeAnnotation':
return nullable ? 'Ljava/lang/Float;' : 'F';
return nullable ? 'Ljava/lang/Double;' : 'D';
case 'Int32TypeAnnotation':
return nullable ? 'Ljava/lang/Integer;' : 'I';
return nullable ? 'Ljava/lang/Double;' : 'D';
case 'PromiseTypeAnnotation':
return 'Lcom/facebook/react/bridge/Promise;';
case 'GenericObjectTypeAnnotation':
Expand Down

0 comments on commit 5ac21d8

Please sign in to comment.