Skip to content

Multi implements / extends issue #2508

Closed
@JesseCodeBones

Description

@JesseCodeBones

Hi Maintainers,
I found the class resolver for implements only check the name of the property or function, with will cause compile error during multi implements or extends.
here is demo code:

interface TwoDimensionalCoordinates {
    x: i32;
    y: i32;
}

interface ThreeDimensionalCoordinates {
    x: i32;
    y: i32;
    z: i32;
}

class RealCoordinates implements TwoDimensionalCoordinates, ThreeDimensionalCoordinates {
    x: i32 = 2;
    y: i32 = 2;
    z: i32 = 2;
}
let a = new RealCoordinates();

I think if the parents vitual function or parameter has same name should bypass this check.
WDYT?

the main check logic should be in isCompatibleOverride of reslover.

Metadata

Metadata

Assignees

No one assigned

    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