Skip to content

private method can be redeclared in a child class as public without the compiler fail to compile #105

@carlosrovira

Description

@carlosrovira

Hi,

working in an example for Tour De Jewel found the following bug:

  • In 'components.ExampleAndSourceCodeTabbedSectionContent.as' I have a private 'changeHandler' method.
  • In 'ButtonBarPlayGround.mxml' (that extends 'ExampleAndSourceCodeTabbedSectionContent') I created a public 'changeHandler' method that is called from a ButtonBar instance in the 'change' event declared in mxml.

Running TDJ result in the following issue: 'change' event handler tries to call the private changeHandler in 'ExampleAndSourceCodeTabbedSectionContent' and fails with an error since event target is not the right one.

This seems to me a bug since compiler should fail to compile and report that 'changeHandler' method is already declared in the parent class as private. Or maybe I'm wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions