Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Subtypes in unions aren't working correctly #61

Open
jpbelang opened this issue Mar 15, 2020 · 0 comments
Open

Subtypes in unions aren't working correctly #61

jpbelang opened this issue Mar 15, 2020 · 0 comments
Projects

Comments

@jpbelang
Copy link
Contributor

This is because of subtypes are not handled correctly.

Faulty code is here

    private Shape findParentType(Shape typeDeclaration) {
        if (typeDeclaration instanceof NodeShape) {
            NodeShape otd = (NodeShape) typeDeclaration;
            return otd.inherits().size() > 0 ? otd.inherits().get(0) : otd;
        } else {
            return typeDeclaration;
        }
    }

This returns the wrong type.

@jpbelang jpbelang added this to To do in 2.0.0 via automation Mar 15, 2020
@jpbelang jpbelang moved this from To do to In progress in 2.0.0 Mar 15, 2020
@jpbelang jpbelang moved this from In progress to Done in 2.0.0 May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
2.0.0
  
Done
Development

No branches or pull requests

1 participant