microsoft / fluentui-android

MIT License
574 stars 103 forks source link

BUG - Overriding Drawer class causes inherited platform declarations clash #7

Closed postfixNotation closed 3 weeks ago

postfixNotation commented 4 years ago

https://github.com/microsoft/fluentui-android/blob/2f9491e8d98721a4672bf1e462b78fcbec979ce0/FluentUI/src/main/java/com/microsoft/fluentui/drawer/Drawer.kt#L61

When I try to subclass FluentUI's Drawer class, Android Studio shows me the following warning

Inherited platform declarations clash: The following declarations have the same JVM signature (onDismiss(Landroid/content/DialogInterface;)V): fun onDismiss(dialog: DialogInterface): Unit defined in .../DrawerSubClass fun onDimiss(dialog: DialogInterface?): Unit defined in .../DrawerSubClass

I think the Kotlin nullable indicator ? causes the issue. If you inspect DialogFragment class the signature is as follows: public void onDismiss(@NonNull DialogInterface dialog) Whereas override fun onDismiss(dialog: DialogInterface?) is the Drawer's signature.

Side note: I'm using AndroidX

joyeeta26 commented 3 weeks ago

the nullable indicator has been removed from the onDismiss function parameter. Please refer latest code. Closing this issue! Thanks! cc: @Dhoot