Skip to content

feat(kernel): Normalize empty structs to undefined#416

Merged
RomainMuller merged 2 commits intomasterfrom
rmuller/fix-411
Apr 2, 2019
Merged

feat(kernel): Normalize empty structs to undefined#416
RomainMuller merged 2 commits intomasterfrom
rmuller/fix-411

Conversation

@RomainMuller
Copy link
Copy Markdown
Contributor

Upon deserializing objects from a "native" front-end (Java, .NET, ...),
the kernel now interprets an empty value for a struct type (aka data
type) as undefined, since front-ends that perform keyword lifting such
as Python will not be able to distinguish between "no argument passed"
and "an empty argument passed".

Fixes #411

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Upon deserializing objects from a "native" front-end (Java, .NET, ...),
the kernel now interprets an empty value for a struct type (aka data
type) as `undefined`, since front-ends that perform keyword lifting such
as Python will not be able to distinguish between "no argument passed"
and "an empty argument passed".

Fixes #411
@RomainMuller RomainMuller requested a review from a team as a code owner April 1, 2019 11:29
Copy link
Copy Markdown
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a conformance test for this as well?

Comment thread packages/jsii-calc/lib/compliance.ts
@eladb
Copy link
Copy Markdown
Contributor

eladb commented Apr 2, 2019

Shall we get this merged?

@RomainMuller RomainMuller merged commit a8ee954 into master Apr 2, 2019
@RomainMuller RomainMuller deleted the rmuller/fix-411 branch April 2, 2019 07:24
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