-
Notifications
You must be signed in to change notification settings - Fork 247
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
Java/DotNet: abstract members are not marked as such on their .NET and Java representations. #1011
Labels
bug
This issue is a bug.
in-progress
Issue is being actively worked on.
language/dotnet
Related to .NET bindings (C#, F#, ...)
language/java
Related to Java bindings
p1
Comments
This feels wrong-- the |
Same problem affecting c# - https://github.com/rix0rrr/jsii-test-drive/blob/master/dotnet/serverless/src/Serverless/Program.cs |
Accessing the "abstract" member results in a predictable JSII exception:
|
This is actually a duplicate of #240 |
RomainMuller
added a commit
that referenced
this issue
Dec 16, 2019
The generated code for abstract properties in Java and C# included fully concrete implementations, instead of an abstract declaration. This made it possible to subclass those types without actually implementing those members, resulting in invalid code. This changes the code generation to actually emit the `abstract` keyword and not generate a full concrete implementation. Fixes #240 Fixes #1011
mergify bot
pushed a commit
that referenced
this issue
Dec 19, 2019
…1128) * fix(java,dotnet): abstract properties have concrete implementations The generated code for abstract properties in Java and C# included fully concrete implementations, instead of an abstract declaration. This made it possible to subclass those types without actually implementing those members, resulting in invalid code. This changes the code generation to actually emit the `abstract` keyword and not generate a full concrete implementation. Fixes #240 Fixes #1011 * add some test coverage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
This issue is a bug.
in-progress
Issue is being actively worked on.
language/dotnet
Related to .NET bindings (C#, F#, ...)
language/java
Related to Java bindings
p1
🐛 Bug Report
In this code:
https://github.com/rix0rrr/jsii-test-drive/blob/master/java/extends-abstract-class/src/main/java/com/myorg/MyCode.java
The subclass of
Code
is not complete. It is missing an implementation ofpublic abstract readonly isInline: boolean
.This class should have been needed to be marked abstract, but it it isn't.
Impact to CDK
The text was updated successfully, but these errors were encountered: