Skip to content

Ensure Data Types have a "pure" inheritance tree #287

@dstufft

Description

@dstufft

Data Types and "Normal" interfaces need to have distinct inheritance trees for the Python generated code to function. IOW, a data type can't inherent from a non data type, and a non data type can't inherit from a data type.

#271 should solve the case where a data type cannot inherit from a non data type, however it's still the case that a non data type can inherit from a data type. IOW this currently is accepted:

export interface SomeProps {
    foo: str
}

export interface ISomething extends SomeProps {
    bar(): void;
}

However, that could would cause an error in Python, because a "normal" interface cannot inherit from a data type, so we should reject that in the JSII compiler.

Metadata

Metadata

Assignees

Labels

effort/smallSmall work item – less than a day of effortp0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions