Skip to content

Commit dc3ad38

Browse files
fix(android): compile RNGestureHandlerModule with Kotlin 2.3
Avoid shadowing between the local `rootViewTag` and the synthetic Kotlin property on `ReactRootView` by using an explicit receiver and `getRootViewTag()`. Fixes compilation with Kotlin 2.3.x toolchains (e.g. alongside Stripe and other SDKs built with Kotlin 2.3 metadata). Made-with: Cursor
1 parent 8c1b72d commit dc3ad38

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ class RNGestureHandlerModule(reactContext: ReactApplicationContext?) :
170170
}
171171
synchronized(roots) {
172172
return roots.firstOrNull {
173-
it.rootView is ReactRootView && it.rootView.rootViewTag == rootViewTag
173+
val rv = it.rootView
174+
rv is ReactRootView && rv.getRootViewTag() == rootViewTag
174175
}
175176
}
176177
}

0 commit comments

Comments
 (0)