Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal class erasure does not implement interface in derived #487

Closed
eladb opened this issue May 2, 2019 · 3 comments · Fixed by #491
Closed

Internal class erasure does not implement interface in derived #487

eladb opened this issue May 2, 2019 · 3 comments · Fixed by #491
Assignees

Comments

@eladb
Copy link
Contributor

eladb commented May 2, 2019

Repro:

export interface IExternal { }
class Internal implements IExternal { }
export class Derived extends Internal { }

I am expecting the jsii spec for Derived to implement IExternal as an interface.

@skinny85
Copy link
Contributor

skinny85 commented May 2, 2019

Oh, is this actually allowed in JSII?

I thought I remember seeing an error that all superclasses of an exported class need to be exported as well... but if that's not the case, that actually changes some design choices I made in the CDK :).

@eladb
Copy link
Contributor Author

eladb commented May 2, 2019

Yes, we recently added this support, but obvsiouly missed this (#417)

@eladb eladb self-assigned this May 5, 2019
@eladb
Copy link
Contributor Author

eladb commented May 5, 2019

I have a fix. Will send a PR shortly

@eladb eladb closed this as completed in #491 May 5, 2019
eladb pushed a commit that referenced this issue May 5, 2019
When a base class is erased, we now treat it's "implementation" clauses
as if they were part of the original class (similar to how we merge declarations
for methods/properties).

Fixes #487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants