-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Issue Description
The "Val cannot be reassigned" error that was previously fixed has reappeared in version 2.0.0, suggesting a regression in the codebase.
Environment
- React Native: 0.74+
- Library Version: 2.0.0
- Platform: Android
Issue Timeline
Background
- Pre-v1.0.0: The "Val cannot be reassigned" error was present in React Native 0.74+ [issue #736]
- v1.0.0: Issue was resolved with [PR #746]
android/src/main/java/com/reactnativemenu/MenuViewManagerBase.kt
view.hitSlopRect = null→view.setHitSlopRect(null) - v1.2.0: Further improvements were added, including the
setHitSlopRectoverride method
( android/src/main/java/com/reactnativemenu/MenuView.kt -override fun setHitSlopRect)
override fun setHitSlopRect(rect: Rect?) {
super.setHitSlopRect(rect)
mHitSlopRect = rect
updateTouchDelegate()
}- v2.0.0: Regression occurred - previous fixes appear to have been reverted
Expected Behavior
The library version 2.0.0 should work without compilation errors on React Native 0.74+, as it did in versions 1.0.0 through 1.2.4.
Actual Behavior
The "Val cannot be reassigned" compilation error has returned, breaking builds for React Native 0.74+ projects.
Reproduction Steps
- Use library version 2.0.0
- Build project with React Native 0.74+
- Encounter "Val cannot be reassigned" compilation error
Possible Solution
Restore the fixes that were implemented in v1.0.0 (PR #746) and the enhancements from v1.2.4, particularly:
- The
setHitSlopRectoverride method - Using
view.setHitSlopRect(null)instead ofview.hitSlopRect = null
adorum, joeltjames, schachris, Doko-Demo-Doa, deepnothing and 2 more
Metadata
Metadata
Assignees
Labels
No labels