Skip to content

Compiler doesn't produce error for conflicting blueprint implementations from inheritance #119

Open
@alleew

Description

@alleew

The compiler seems to not correctly produce an error if a class has two different implementations of an action from its parent classes, under some conditions.

This occurs in the FreeformBlockPart class in the standard library. It inherits from FreeformBlock and MultipleLineBlockPart. From these two classes, there are two paths of inheritance:

FreeformBlockPart > FreeformBlock > SingleLineBlock > Block
FreeformBlockPart > MultipleLineBlockPart > SingleLineBlock > Block

The Block class provides a blueprint action for GetChildCount. This is implemented in SingleLineBlock and in MultipleLineBlockPart. When compiled, the program produces no errors, even though the implementation available to FreeformBlock conflicts with the implementation from MultipleLineBlockPart. I suspect that, since MultipleLineBlockPart overrides the action from SingleLineBlock along one path of the inheritance hierarchy, it's considered to override the action from the other inheritance path as well. If the program is run, it uses the GetChildCount action from MultipleLineBlockPart.

(Note that, after filing this bug, an explicit override is being put into FreeformBlockPart for GetChildCount. Remove the new override to test the behavior.)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions