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

fix(kernel): Correctly return instances of un-exported types #321

Merged
merged 2 commits into from
Nov 26, 2018

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Nov 26, 2018

When an un-exported type that extends an exported type is returned with
an interface as the declared type, the JSII kernel used to return a ref
with the FQN of the exported supertype, instead of correctly wrapping
the instance in a proxy of the interface type as it should have.

Fixes #320

This test covers the behavior of the JSII runtimes when a method is
declared to return an interface type, and returns an instance of a
private (un-exported) type that implements the interface while extending
an exported type. This has been seen to cause issues in the Java
runtime, for example, as the JSII kernel will return an ObjID with a
type fragment that refers to the exported super-class, and not the
interface type.
When an un-exported type that extends an exported type is returned with
an interface as the declared type, the JSII kernel used to return a ref
with the FQN of the exported supertype, instead of correctly wrapping
the instance in a proxy of the interface type as it should have.

Fixes #302
@RomainMuller RomainMuller changed the title chore: Add compliance test around #320 fix(kernel): Correctly return instances of un-exported types Nov 26, 2018
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 this pull request may close these issues.

2 participants