mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix OSS Android build with enableWarningsAsErrors=true (#39311)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/39311 ## Changelog: [Internal] - Follow up to https://github.com/facebook/react-native/pull/39284 (D48960815), which landed and broke one of the build clauses on CircleCI tests (treating unused parameters as errors, even though they are expected to be unused). Reviewed By: hoxyq Differential Revision: D49010472 fbshipit-source-id: 469bf3a9923b85e465d4574e69e9372c16fbc125
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b08d0df95f
commit
edff5e977e
+7
-1
@@ -26,6 +26,7 @@ class ReactPropForShadowNodeSpecTest {
|
||||
fun testMethodWithWrongNumberOfParams() {
|
||||
BaseViewManager(
|
||||
object : ReactShadowNodeImpl() {
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ReactProp(name = "prop")
|
||||
fun setterWithIncorrectNumberOfArgs(value: Boolean, anotherValue: Int) {}
|
||||
}
|
||||
@@ -47,7 +48,9 @@ class ReactPropForShadowNodeSpecTest {
|
||||
fun testUnsupportedValueType() {
|
||||
BaseViewManager(
|
||||
object : ReactShadowNodeImpl() {
|
||||
@ReactProp(name = "prop") fun setterWithMap(value: Map<*, *>) {}
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ReactProp(name = "prop")
|
||||
fun setterWithMap(value: Map<*, *>) {}
|
||||
}
|
||||
.javaClass)
|
||||
.nativeProps
|
||||
@@ -57,6 +60,7 @@ class ReactPropForShadowNodeSpecTest {
|
||||
fun testGroupInvalidNumberOfParams() {
|
||||
BaseViewManager(
|
||||
object : ReactShadowNodeImpl() {
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ReactPropGroup(names = ["prop1", "prop2"])
|
||||
fun setterWithTooManyParams(index: Int, value: Float, boolean: Boolean) {}
|
||||
}
|
||||
@@ -68,6 +72,7 @@ class ReactPropForShadowNodeSpecTest {
|
||||
fun testGroupTooFewParams() {
|
||||
BaseViewManager(
|
||||
object : ReactShadowNodeImpl() {
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ReactPropGroup(names = ["props1", "prop2"])
|
||||
fun setterWithTooFewParams(index: Int) {}
|
||||
}
|
||||
@@ -79,6 +84,7 @@ class ReactPropForShadowNodeSpecTest {
|
||||
fun testGroupNoIndexParam() {
|
||||
BaseViewManager(
|
||||
object : ReactShadowNodeImpl() {
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
@ReactPropGroup(names = ["prop1", "prop2"])
|
||||
fun setterWithNoIndexParam(value: Float, boolean: Boolean) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user