You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is a minimal reproducing example: ```ts export interface ISomeInterface { readonly xyz?: string; } export abstract class SomeClass implements ISomeInterface { } ``` This breaks code generation for C#, as the `SomeClass._Proxy` class we generate will try to generate an `override` for the `Xyz` property, which is missing from the `SomeClass` class itself. This issue is exhibited by a difference in logic between how we iterate the members of a class when we generate the class itself vs when we generate its proxy. However, after looking at the code I'm not convinced it's correct either way (nor for Java), so to be safe we picked the solution where we force the user to declare the property on the class. The correct declaration would be: ```ts export abstract class SomeClass implements ISomeInterface { public abstract readonly xyz?: string; } ``` Related: https://github.com/aws/aws-cdk/pull/31946/files --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --------- Signed-off-by: github-actions <github-actions@github.com> Co-authored-by: github-actions <github-actions@github.com>
`A declaration of "${intf.name}.${prop}" is missing on class "${cls.name}". Declare the property as "public abstract" if you want to defer it to subclasses.`,
0 commit comments