Skip to content

Child Widget extends another non-abstract parent Widget would throw NoSuchMethodException if child using parent method #395

@truebit

Description

@truebit

Description

Child Widget extends another non-abstract parent Widget would throw NoSuchMethodException if child using parent method

Details

For example:
I only tried in OverrideWidget scenario. Below example could reproduce the issue:

There is an abstract Widget named AbstractWidget, I implemented two widgets AndroidParentWidget and IOSParentWidget to extends AbstractWidget.

Then I implemented another widget named AndroidChildWidget extends AndroidParentWidget. in AndroidChildWidget, I only added one more method. Other existing methods such like parentMethod() in AndroidChildWidget just being extended directly without override.

When invoking AndroidChildWidget.parentMethod() in test code, it would throw NoSuchMethodException.

I found a workaround: override parentMethod in AndroidChildWidget explicitly with super.parentMethod(). it would work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions