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

Add compile check for interface down-cast without explicit implementation #140

Closed
eladb opened this issue Aug 3, 2018 · 3 comments
Closed
Labels
closed-for-staleness effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. module/compiler Issues affecting the JSII compiler p2

Comments

@eladb
Copy link
Contributor

eladb commented Aug 3, 2018

Repro:

class MyClass {
  foo: number
}

interface Fooable {
  foo: number;
}

var f: Fooable = new MyClass() as Fooable;

This works in TypeScript but will fail (at runtime) in Java.

See: aws/aws-cdk#504, aws/aws-cdk#505

@eladb
Copy link
Contributor Author

eladb commented Aug 5, 2018

This might be very hard to validate since we only look at public APIs

@SomayaB SomayaB added the feature-request A feature should be added or improved. label Nov 18, 2019
@SomayaB SomayaB added the still-relevant? Checking to see if the issue is still relevant label Dec 19, 2019
@RomainMuller RomainMuller removed the still-relevant? Checking to see if the issue is still relevant label Jan 7, 2020
@RomainMuller
Copy link
Contributor

Technically we have access to everything, so it can be done. But it won't be trivial for sure.

@RomainMuller RomainMuller added module/compiler Issues affecting the JSII compiler p2 labels Jan 7, 2020
@SomayaB SomayaB added the effort/large Large work item – several weeks of effort label Jan 7, 2020
@RomainMuller RomainMuller removed their assignment Jun 24, 2021
@github-actions
Copy link
Contributor

This issue has not received any attention in 2 years. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. module/compiler Issues affecting the JSII compiler p2
Projects
None yet
Development

No branches or pull requests

3 participants