Skip to content

Commit 8a6b88e

Browse files
cortinicofacebook-github-bot
authored andcommitted
Back out "Add Float and Int type support for Android modules" (facebook#45087)
Summary: Pull Request resolved: facebook#45087 Original commit changeset: 32b3bbdf5fd2 Fixes facebook#44963 Closes facebook#45024 Original Phabricator Diff: D52420921 Changelog: [Internal] [Changed] - Back out "[RN][Codegen]Add Float and Int type support for Android modules" Reviewed By: dmytrorykun Differential Revision: D58820544 fbshipit-source-id: 59cd0e7cc17a681785c57b5ce1a9d50d28a348af
1 parent 8a3ffb6 commit 8a6b88e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/react-native-codegen/src/generators/modules/GenerateModuleJavaSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ function translateFunctionParamToJavaType(
136136
case 'NumberTypeAnnotation':
137137
return wrapOptional('double', isRequired);
138138
case 'FloatTypeAnnotation':
139-
return wrapOptional('float', isRequired);
139+
return wrapOptional('double', isRequired);
140140
case 'DoubleTypeAnnotation':
141141
return wrapOptional('double', isRequired);
142142
case 'Int32TypeAnnotation':
143-
return wrapOptional('int', isRequired);
143+
return wrapOptional('double', isRequired);
144144
case 'BooleanTypeAnnotation':
145145
return wrapOptional('boolean', isRequired);
146146
case 'EnumDeclaration':

packages/react-native-codegen/src/generators/modules/GenerateModuleJniCpp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ function translateReturnTypeToJniType(
334334
case 'DoubleTypeAnnotation':
335335
return nullable ? 'Ljava/lang/Double;' : 'D';
336336
case 'FloatTypeAnnotation':
337-
return nullable ? 'Ljava/lang/Float;' : 'F';
337+
return nullable ? 'Ljava/lang/Double;' : 'D';
338338
case 'Int32TypeAnnotation':
339-
return nullable ? 'Ljava/lang/Integer;' : 'I';
339+
return nullable ? 'Ljava/lang/Double;' : 'D';
340340
case 'PromiseTypeAnnotation':
341341
return 'Lcom/facebook/react/bridge/Promise;';
342342
case 'GenericObjectTypeAnnotation':

0 commit comments

Comments
 (0)